diff options
-rw-r--r-- | decoder/ihevcd_decode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/ihevcd_decode.c b/decoder/ihevcd_decode.c index 7b82e84..04ad8f5 100644 --- a/decoder/ihevcd_decode.c +++ b/decoder/ihevcd_decode.c @@ -421,7 +421,8 @@ WORD32 ihevcd_decode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op) if(0 == ps_codec->i4_share_disp_buf && ps_codec->i4_header_mode == 0) { UWORD32 i; - if(ps_dec_ip->s_out_buffer.u4_num_bufs == 0) + if((ps_dec_ip->s_out_buffer.u4_num_bufs <= 0) || + (ps_dec_ip->s_out_buffer.u4_num_bufs > IVD_VIDDEC_MAX_IO_BUFFERS)) { ps_dec_op->u4_error_code |= 1 << IVD_UNSUPPORTEDPARAM; ps_dec_op->u4_error_code |= IVD_DISP_FRM_ZERO_OP_BUFS; |