Commit b425b81f authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1b3b018a
...@@ -2196,7 +2196,7 @@ static int sdp_probe(AVProbeData *p1) ...@@ -2196,7 +2196,7 @@ static int sdp_probe(AVProbeData *p1)
/* we look for a line beginning "c=IN IP" */ /* we look for a line beginning "c=IN IP" */
while (p < p_end && *p != '\0') { 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)) av_strstart(p, "c=IN IP", NULL))
return AVPROBE_SCORE_EXTENSION; return AVPROBE_SCORE_EXTENSION;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment