Module: kamailio
Branch: 5.5
Commit: f387209ca7efd65a1fd7ee510d899fec6e080289
URL:
https://github.com/kamailio/kamailio/commit/f387209ca7efd65a1fd7ee510d899fe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-16T08:29:28+01:00
core: parser/sdp - cast to unsigned for left shifting
(cherry picked from commit c1ec3857f360c806b7cc856b8e6ae3d5362ef49f)
---
Modified: src/core/parser/sdp/sdp_helpr_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f387209ca7efd65a1fd7ee510d899fe…
Patch:
https://github.com/kamailio/kamailio/commit/f387209ca7efd65a1fd7ee510d899fe…
---
diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c
b/src/core/parser/sdp/sdp_helpr_funcs.c
index 8f189cf207..e118b4ac33 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -52,7 +52,10 @@ static struct {
#define READ(val) \
- (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) <<
24))
+ ((unsigned int)(*(val + 0)) \
+ + ((unsigned int)(*(val + 1)) << 8) \
+ + ((unsigned int)(*(val + 2)) << 16) \
+ + ((unsigned int)(*(val + 3)) << 24))
#define advance(_ptr,_n,_str,_error) \
do{\
if ((_ptr)+(_n)>(_str).s+(_str).len)\