From cea3c9b281246f5ff5d27b1a02e3434b3ee178a6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 2 Jun 2015 14:45:08 +0200 Subject: [PATCH] ffserver: check return code of avio_alloc_context() Signed-off-by: Michael Niedermayer --- ffserver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ffserver.c b/ffserver.c index 4803b96cd4..06218e0faf 100644 --- a/ffserver.c +++ b/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;