avutil/avstring: dont mess with NULL pointers in av_match_list()

Fixes: applying zero offset to null pointer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
master
Michael Niedermayer 3 weeks ago
parent 2ac2ebcd76
commit c6c54943d1
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 6
      libavutil/avstring.c

@ -452,10 +452,12 @@ int av_match_list(const char *name, const char *list, char separator)
if (k && (!p[k] || p[k] == separator))
return 1;
q = strchr(q, separator);
q += !!q;
if(q)
q++;
}
p = strchr(p, separator);
p += !!p;
if (p)
p++;
}
return 0;

Loading…
Cancel
Save