OSDN Git Service

Add missing check to av_get_token().
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 13 Jun 2010 09:27:09 +0000 (09:27 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 13 Jun 2010 09:27:09 +0000 (09:27 +0000)
Originally committed as revision 23594 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/parseutils.c

index 9ac61d8..53f03dc 100644 (file)
@@ -34,6 +34,7 @@ char *av_get_token(const char **buf, const char *term)
     char *out = av_malloc(strlen(*buf) + 1);
     char *ret= out, *end= out;
     const char *p = *buf;
+    if (!out) return NULL;
     p += strspn(p, WHITESPACES);
 
     while(*p && !strspn(p, term)) {