Commit 0b2f860d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'f4017925'

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

Conflicts:
	libavfilter/vf_drawtext.c

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