aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer2015-05-13 13:53:33 +0200
committerMichael Niedermayer2015-05-13 14:26:17 +0200
commit65e5032955cb5022f0f39160aa3839f0799456bd (patch)
treec4c82a7a570cee4b9e7b5d264dd1b15f6a36d3cf
parentb195aa5d529040f43ab3acf0079cecbeb111bd57 (diff)
avcodec/hevc_ps: Explicitly check num_tile_* for negative values
This fixes nothing but maybe helps coverity which does not see that this is failing later Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc_ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 196ce3681d..d9a0ed40b9 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1356,14 +1356,14 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
if (pps->tiles_enabled_flag) {
pps->num_tile_columns = get_ue_golomb_long(gb) + 1;
pps->num_tile_rows = get_ue_golomb_long(gb) + 1;
- if (pps->num_tile_columns == 0 ||
+ if (pps->num_tile_columns <= 0 ||
pps->num_tile_columns >= sps->width) {
av_log(s->avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n",
pps->num_tile_columns - 1);
ret = AVERROR_INVALIDDATA;
goto err;
}
- if (pps->num_tile_rows == 0 ||
+ if (pps->num_tile_rows <= 0 ||
pps->num_tile_rows >= sps->height) {
av_log(s->avctx, AV_LOG_ERROR, "num_tile_rows_minus1 out of range: %d\n",
pps->num_tile_rows - 1);