Commit 0aefcb6a authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

cdgraphics: Fix out of array write


Fixes Ticket1359
Found-by: default avatarPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1e5c7376

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -280,6 +280,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "buffer too small for decoder\n");
return AVERROR(EINVAL);
}
if (buf_size > CDG_HEADER_SIZE + CDG_DATA_SIZE) {
av_log(avctx, AV_LOG_ERROR, "buffer too big for decoder\n");
return AVERROR(EINVAL);
}
ret = avctx->reget_buffer(avctx, &cc->frame);
if (ret) {
......
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