diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-18 21:31:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-18 21:33:04 +0200 |
commit | 0b2f860db53e6274836036d3e3ff57f8d043aa0f (patch) | |
tree | 266a2b356c3e52dd3c0659709749be0f0e1e85d3 | |
parent | f4445c7be45cdd84e9db887a5cfae55e9ff5868d (diff) | |
parent | f401792595dd7760f531e8a3bd2336e9033bd45a (diff) | |
download | ffmpeg-0b2f860db53e6274836036d3e3ff57f8d043aa0f.tar.gz |
Merge commit 'f401792595dd7760f531e8a3bd2336e9033bd45a'
* commit 'f401792595dd7760f531e8a3bd2336e9033bd45a':
vf_drawtext: Do not leak the mmapped textfile
Conflicts:
libavfilter/vf_drawtext.c
See: 6956b048d8198dce5126c8942dece21cfb1a7978
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_drawtext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 4ab96dc46a..cf57064355 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -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); } |