aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 12:54:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 23:59:50 +0100
commitd0599a3516c5da31c7009af7574abbff360b9ce6 (patch)
tree41f5ca2fca426da158154c29794bd68c247f7294 /libavcodec
parent742d7e9a6e4e7dce6c2559b5a8f5cab4c111e430 (diff)
downloadffmpeg-d0599a3516c5da31c7009af7574abbff360b9ce6.tar.gz
avcodec/hevc_ps: Check cropping parameters more correctlyn2.5.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 06c70d45373dedc600f28e345685b130b60203c1) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevc_ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 3309377455..d7e78b1b77 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1040,7 +1040,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
(sps->output_window.left_offset + sps->output_window.right_offset);
sps->output_height = sps->height -
(sps->output_window.top_offset + sps->output_window.bottom_offset);
- if (sps->output_width <= 0 || sps->output_height <= 0) {
+ if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset ||
+ sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) {
av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n",
sps->output_width, sps->output_height);
if (s->avctx->err_recognition & AV_EF_EXPLODE) {