[FFmpeg-devel] [PATCH 4/4] Add missing check to av_get_token().

Stefano Sabatini stefano.sabatini-lala
Sat Jun 12 20:28:52 CEST 2010


---
 libavutil/avstring.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 667558a..7f00e55 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -105,6 +105,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)) {
-- 
1.7.1




More information about the ffmpeg-devel mailing list