mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Merge commit '3185a80259ce1f8f8111073dbd14a69a396e03a3'
* commit '3185a80259ce1f8f8111073dbd14a69a396e03a3': fraps: Make the input buffer size checks more strict Conflicts: libavcodec/fraps.c The added checks are mostly to handle duplicate frames, which we discard, thus there are also no P frames for example. Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
9bb86faca7
@ -143,6 +143,11 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
const int planes = 3;
|
||||
uint8_t *out;
|
||||
|
||||
if (buf_size < 4) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Packet is too short\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
header = AV_RL32(buf);
|
||||
version = header & 0xff;
|
||||
header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */
|
||||
|
Loading…
Reference in New Issue
Block a user