Merge commit 'a594f17f83a1ffdc1eec18818208fe39487dd5d7'
* commit 'a594f17f83a1ffdc1eec18818208fe39487dd5d7': dvbsubdec: Free subrect memory on allocation error dvbsubdec: Fixed segfault when decoding subtitles See fbb59a3bf4c8668197521b3db5f26d0e93aed1a6 39dfe6801a3f67c2964a829b65e8e38e3cb22217 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…
x
Reference in New Issue
Block a user