summaryrefslogtreecommitdiff
path: root/libavfilter/avf_ahistogram.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-05-20 17:55:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-05-21 18:47:25 +0200
commite7c5dbb4d117591f4ec19a57828155d2009f9bd6 (patch)
treea4b13236a93a10116ef6a56c7ca559466656f96b /libavfilter/avf_ahistogram.c
parent8e069eb525d46b8f89089e37fc7ac81b2d9b1092 (diff)
downloadffmpeg-e7c5dbb4d117591f4ec19a57828155d2009f9bd6.tar.gz
avfilter/avf_ahistogram: raise minimum acmax to 1
If acmax can be 0 then it could result in a division by 0 Fixes CID1351345 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/avf_ahistogram.c')
-rw-r--r--libavfilter/avf_ahistogram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c
index a716a96f2d..ff94ad47df 100644
--- a/libavfilter/avf_ahistogram.c
+++ b/libavfilter/avf_ahistogram.c
@@ -165,7 +165,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
const int H = s->histogram_h;
const int w = s->w;
int c, y, n, p, bin;
- uint64_t acmax = 0;
+ uint64_t acmax = 1;
if (!s->out || s->out->width != outlink->w ||
s->out->height != outlink->h) {