Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 06c70d45373dedc600f28e345685b130b60203c1)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -1040,7 +1040,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) |
1040 | 1040 |
(sps->output_window.left_offset + sps->output_window.right_offset); |
1041 | 1041 |
sps->output_height = sps->height - |
1042 | 1042 |
(sps->output_window.top_offset + sps->output_window.bottom_offset); |
1043 |
- if (sps->output_width <= 0 || sps->output_height <= 0) { |
|
1043 |
+ if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset || |
|
1044 |
+ sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) { |
|
1044 | 1045 |
av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n", |
1045 | 1046 |
sps->output_width, sps->output_height); |
1046 | 1047 |
if (s->avctx->err_recognition & AV_EF_EXPLODE) { |