Browse Source

ffserver: check return code of avio_alloc_context()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 9 years ago
parent
commit
cea3c9b281
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ffserver.c

+ 3 - 0
ffserver.c

@@ -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;