mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '522d971c7f5921bebcea2fc50e67056afdabb951'
* commit '522d971c7f5921bebcea2fc50e67056afdabb951': xsub: Check memory allocation Conflicts: libavcodec/xsubdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
211dcdca5c
@ -109,10 +109,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
sub->rects[0]->nb_colors = 4;
|
||||
sub->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
|
||||
if (!sub->rects[0]->pict.data[0] || !sub->rects[0]->pict.data[1]) {
|
||||
av_freep(&sub->rects[0]->pict.data[1]);
|
||||
av_freep(&sub->rects[0]->pict.data[0]);
|
||||
av_freep(&sub->rects[0]);
|
||||
av_freep(&sub->rects);
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
}
|
||||
sub->num_rects = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user