Browse Source

rtsp: Check a memory allocation

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.4.7
Michael Lynch Vittorio Giovara 11 years ago
parent
commit
b31bb39bdd
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rtsp.c

+ 2
- 0
libavformat/rtsp.c View File

@@ -1146,6 +1146,8 @@ start:
if (content_length > 0) {
/* leave some room for a trailing '\0' (useful for simple parsing) */
content = av_malloc(content_length + 1);
if (!content)
return AVERROR(ENOMEM);
ffurl_read_complete(rt->rtsp_hd, content, content_length);
content[content_length] = '\0';
}


Loading…
Cancel
Save