Commit 9f0b898e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8f1afde1
......@@ -1198,8 +1198,12 @@ static int dvbsub_parse_region_segment(AVCodecContext *avctx,
region->buf_size = region->width * region->height;
region->pbuf = av_malloc(region->buf_size);
if (!region->pbuf)
if (!region->pbuf) {
region->buf_size =
region->width =
region->height = 0;
return AVERROR(ENOMEM);
}
fill = 1;
region->dirty = 0;
......
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