@rfuchs commented on this pull request.
In src/modules/rtpengine/rtpengine.c:
> @@ -1992,6 +1992,10 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu if (str_key_val_prefix(&key, "transcode", &val, &s) || str_key_val_prefix(&key, "codec-transcode", &val, &s)) { + if(s.len<=0 && s.s==NULL){
There's actually a much better solution to this, which is to change str_key_val_prefix()
, which is where the bug actually is.
The function should read:
static inline int str_key_val_prefix(const str *p, const char *q, const str *v, str *out) {
if (str_eq(p, q)) {
if (!v->s || !v->len)
return 0;
*out = *v;
return 1;
}
...
`
Then all the explicit null checks here and below can be removed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.