You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/sdp: Fix potential write beyond end of buffer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -212,7 +212,7 @@ static char *extradata2psets(AVFormatContext *s, AVCodecParameters *par)
|
|||||||
p += strlen(p);
|
p += strlen(p);
|
||||||
r = r1;
|
r = r1;
|
||||||
}
|
}
|
||||||
if (sps && sps_end - sps >= 4) {
|
if (sps && sps_end - sps >= 4 && p - psets <= MAX_PSET_SIZE - strlen(profile_string) - 7) {
|
||||||
memcpy(p, profile_string, strlen(profile_string));
|
memcpy(p, profile_string, strlen(profile_string));
|
||||||
p += strlen(p);
|
p += strlen(p);
|
||||||
ff_data_to_hex(p, sps + 1, 3, 0);
|
ff_data_to_hex(p, sps + 1, 3, 0);
|
||||||
|
Reference in New Issue
Block a user