ffserver: check return code of avio_alloc_context()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jun 2015 12:45:08 +0000 (14:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jun 2015 12:45:08 +0000 (14:45 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffserver.c

index 4803b96..06218e0 100644 (file)
@@ -2649,6 +2649,9 @@ static int http_receive_data(HTTPContext *c)
 
             pb = avio_alloc_context(c->buffer, c->buffer_end - c->buffer,
                                     0, NULL, NULL, NULL, NULL);
+            if (!pb)
+                goto fail;
+
             pb->seekable = 0;
 
             s->pb = pb;