[sr-dev] git:master:c1ec3857: core: parser/sdp - cast to unsigned for left shifting
Daniel-Constantin Mierla
miconda at gmail.com
Sun Dec 12 19:32:50 CET 2021
Module: kamailio
Branch: master
Commit: c1ec3857f360c806b7cc856b8e6ae3d5362ef49f
URL: https://github.com/kamailio/kamailio/commit/c1ec3857f360c806b7cc856b8e6ae3d5362ef49f
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-12-12T12:31:29+01:00
core: parser/sdp - cast to unsigned for left shifting
---
Modified: src/core/parser/sdp/sdp_helpr_funcs.c
---
Diff: https://github.com/kamailio/kamailio/commit/c1ec3857f360c806b7cc856b8e6ae3d5362ef49f.diff
Patch: https://github.com/kamailio/kamailio/commit/c1ec3857f360c806b7cc856b8e6ae3d5362ef49f.patch
---
diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c b/src/core/parser/sdp/sdp_helpr_funcs.c
index 8f189cf2072..e118b4ac331 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)\
More information about the sr-dev
mailing list