mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
avcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8f1afde11d
commit
9f0b898e82
@ -1198,8 +1198,12 @@ static int dvbsub_parse_region_segment(AVCodecContext *avctx,
|
|||||||
region->buf_size = region->width * region->height;
|
region->buf_size = region->width * region->height;
|
||||||
|
|
||||||
region->pbuf = av_malloc(region->buf_size);
|
region->pbuf = av_malloc(region->buf_size);
|
||||||
if (!region->pbuf)
|
if (!region->pbuf) {
|
||||||
|
region->buf_size =
|
||||||
|
region->width =
|
||||||
|
region->height = 0;
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
fill = 1;
|
fill = 1;
|
||||||
region->dirty = 0;
|
region->dirty = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user