Browse Source

avformat/rtsp: Fix potential pointer overflow in sdp_probe()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
b425b81fd2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/rtsp.c

+ 1
- 1
libavformat/rtsp.c View File

@@ -2196,7 +2196,7 @@ static int sdp_probe(AVProbeData *p1)

/* we look for a line beginning "c=IN IP" */
while (p < p_end && *p != '\0') {
if (p + sizeof("c=IN IP") - 1 < p_end &&
if (sizeof("c=IN IP") - 1 < p_end - p &&
av_strstart(p, "c=IN IP", NULL))
return AVPROBE_SCORE_EXTENSION;



Loading…
Cancel
Save