mirror of https://git.ffmpeg.org/ffmpeg.git
Add missing check to av_get_token().
Originally committed as revision 23594 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
297084275c
commit
5ba949fe90
|
@ -34,6 +34,7 @@ char *av_get_token(const char **buf, const char *term)
|
||||||
char *out = av_malloc(strlen(*buf) + 1);
|
char *out = av_malloc(strlen(*buf) + 1);
|
||||||
char *ret= out, *end= out;
|
char *ret= out, *end= out;
|
||||||
const char *p = *buf;
|
const char *p = *buf;
|
||||||
|
if (!out) return NULL;
|
||||||
p += strspn(p, WHITESPACES);
|
p += strspn(p, WHITESPACES);
|
||||||
|
|
||||||
while(*p && !strspn(p, term)) {
|
while(*p && !strspn(p, term)) {
|
||||||
|
|
Loading…
Reference in New Issue