Commit 6fd7456f authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '608e8d8d' into release/2.4

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

Conflicts:
	libavfilter/vf_drawtext.c

See: 6956b048Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ee025a0c 608e8d8d
......@@ -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);
}
......
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