summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-18 21:31:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-18 21:33:04 +0200
commit0b2f860db53e6274836036d3e3ff57f8d043aa0f (patch)
tree266a2b356c3e52dd3c0659709749be0f0e1e85d3 /libavfilter/vf_drawtext.c
parentf4445c7be45cdd84e9db887a5cfae55e9ff5868d (diff)
parentf401792595dd7760f531e8a3bd2336e9033bd45a (diff)
downloadffmpeg-streaming-0b2f860db53e6274836036d3e3ff57f8d043aa0f.zip
ffmpeg-streaming-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>
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 4ab96dc..cf57064 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);
}
OpenPOWER on IntegriCloud