mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 10:58:03 +03:00
hasvk: Range check and fail the parse upon lost bit alignment in the slice parser.
Assisted-by: Claude
This commit is contained in:
1 parent
fac6387b34
commit
4a162aa46b
1 file changed
+8
@@ -529,6 +529,14 @@ anv_h264_parse_slice_header(
|
||||
}
|
||||
}
|
||||
|
||||
/* Let the caller fall back to concealment if the parser lost bit-alignment. */
|
||||
if (out->slice_alpha_c0_offset_div2 < -6 || out->slice_alpha_c0_offset_div2 > 6 ||
|
||||
out->slice_beta_offset_div2 < -6 || out->slice_beta_offset_div2 > 6 ||
|
||||
out->slice_qp_delta < -51 || out->slice_qp_delta > 51 ||
|
||||
out->disable_deblocking_filter_idc > 2 ||
|
||||
out->cabac_init_idc > 2)
|
||||
st.error = true;
|
||||
|
||||
VALID_RBSP_OR_BAIL(st)
|
||||
|
||||
if (pps->flags.entropy_coding_mode_flag) {
|
||||
|
||||
Reference in new issue
Block a user