mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
Merge commit 'a594f17f83a1ffdc1eec18818208fe39487dd5d7'
* commit 'a594f17f83a1ffdc1eec18818208fe39487dd5d7': dvbsubdec: Free subrect memory on allocation error dvbsubdec: Fixed segfault when decoding subtitles Seefbb59a3bf4
39dfe6801a
Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
7d1c79f533
@ -753,8 +753,13 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for(i=0; i<sub->num_rects; i++)
|
||||
for (i = 0; i < sub->num_rects; i++) {
|
||||
sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));
|
||||
if (!sub->rects[i]) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user