Browse Source

Merge commit 'f401792595dd7760f531e8a3bd2336e9033bd45a'

* commit 'f401792595dd7760f531e8a3bd2336e9033bd45a':
  vf_drawtext: Do not leak the mmapped textfile

Conflicts:
	libavfilter/vf_drawtext.c

See: 6956b048d8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
0b2f860db5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/vf_drawtext.c

+ 1
- 1
libavfilter/vf_drawtext.c View File

@@ -477,7 +477,7 @@ static int load_textfile(AVFilterContext *ctx)
return err;
}

if (!(tmp = av_realloc(s->text, textbuf_size + 1))) {
if (textbuf_size > SIZE_MAX - 1 || !(tmp = av_realloc(s->text, textbuf_size + 1))) {
av_file_unmap(textbuf, textbuf_size);
return AVERROR(ENOMEM);
}


Loading…
Cancel
Save