[h265d]: fix negative length crash issue in split_nal_units

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1110 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-28 01:36:08 +00:00
parent d2de3cbfe5
commit 28f198c973

View File

@@ -1479,7 +1479,7 @@ static RK_S32 split_nal_units(HEVCContext *s, RK_U8 *buf, RK_U32 length)
buf += s->nal_length_size;
length -= s->nal_length_size;
if (extract_length > (RK_S32)length) {
if ((RK_U32)extract_length > length) {
mpp_err( "Invalid NAL unit size.\n");
ret = MPP_ERR_STREAM;
goto fail;