rfuchs commented on this pull request.
@@ -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.