summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-08-23 21:30:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-17 12:21:32 +0200
commit53a6cdf89d694be1f075729f16e0a9e2dcbbcb78 (patch)
tree0a18b13b612553ae6d77e5cb09d2b6e596c7b37e /libavformat/rtpdec_h264.c
parent50cb32480b7691933756bc8a04265a1e488b5e06 (diff)
downloadffmpeg-53a6cdf89d694be1f075729f16e0a9e2dcbbcb78.tar.gz
avformat/rtpdec_h264: Fix heap-buffer-overflow
Fixes: rtp_sdp/poc.sdp Found-by: Bingchang <l.bing.chang.bc@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c42a1388a6d1bfd8001bf6a4241d8ca27e49326d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtpdec_h264.c')
-rw-r--r--libavformat/rtpdec_h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 8dd56a549e..6f8148ab6d 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -166,7 +166,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
parse_profile_level_id(s, h264_data, value);
} else if (!strcmp(attr, "sprop-parameter-sets")) {
int ret;
- if (value[strlen(value) - 1] == ',') {
+ if (*value == 0 || value[strlen(value) - 1] == ',') {
av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n");
return 0;
}