Merge commit '608e8d8dd754199b657b439f9e722e0b45f84461' into release/2.4

* commit '608e8d8dd754199b657b439f9e722e0b45f84461':
  vf_drawtext: Do not leak the mmapped textfile

Conflicts:
	libavfilter/vf_drawtext.c

See: 6956b048d8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-18 00:39:59 +01:00
commit 6fd7456f85

View File

@ -485,7 +485,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);
}