Skip to content

Commit c42a138

Browse files
committed
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>
1 parent eca2a49 commit c42a138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libavformat/rtpdec_h264.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
166166
parse_profile_level_id(s, h264_data, value);
167167
} else if (!strcmp(attr, "sprop-parameter-sets")) {
168168
int ret;
169-
if (value[strlen(value) - 1] == ',') {
169+
if (*value == 0 || value[strlen(value) - 1] == ',') {
170170
av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n");
171171
return 0;
172172
}

0 commit comments

Comments
 (0)