Skip to content
Snippets Groups Projects
Commit b4904e80 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

jvdec: check videosize


Fixes null ptr dereference
fixes Ticket1364

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 50122084
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,10 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -143,6 +143,10 @@ static int decode_frame(AVCodecContext *avctx,
buf += 5; buf += 5;
if (video_size) { if (video_size) {
if(video_size < 0) {
av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size);
return AVERROR_INVALIDDATA;
}
if (avctx->reget_buffer(avctx, &s->frame) < 0) { if (avctx->reget_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment