Commit 7d1c79f5 authored by James Almer's avatar James Almer

Merge commit 'a594f17f'

* commit 'a594f17f':
  dvbsubdec: Free subrect memory on allocation error
  dvbsubdec: Fixed segfault when decoding subtitles

See
fbb59a3b
39dfe680Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents a82a10e0 a594f17f
......@@ -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;
......
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