assert illegal null pointer arithmetic in tcd.c opj_tcd_dc_level_shift_decode

This commit is contained in:
Paul Dreik 2022-08-25 08:38:24 +02:00
parent aecacb8c0b
commit bbf52faf8c
1 changed files with 2 additions and 0 deletions

View File

@ -2324,6 +2324,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
l_max);
++l_current_ptr;
}
assert(l_current_ptr!=NULL && "pointer arithmetic on null pointer is undefined behaviour");
l_current_ptr += l_stride;
}
} else {
@ -2342,6 +2343,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
}
++l_current_ptr;
}
assert(l_current_ptr!=NULL && "pointer arithmetic on null pointer is undefined behaviour");
l_current_ptr += l_stride;
}
}