[vlc-commits] [Git][videolan/vlc][master] packetizer: h266: check layer id range
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Sep 1 08:06:15 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fd895621 by François Cartegnie at 2026-09-01T07:50:31+00:00
packetizer: h266: check layer id range
fix #30057
- - - - -
2 changed files:
- modules/packetizer/h266.c
- modules/packetizer/h266_nal.h
Changes:
=====================================
modules/packetizer/h266.c
=====================================
@@ -804,6 +804,11 @@ static block_t *ParseFrameHeader(decoder_t *p_dec, uint8_t i_nal_type,
bool b_new_au = !p_sys->previous.b_valid;
const uint8_t i_layer = h266_getNALLayer(p_buffer);
+ if(unlikely(i_layer >= H266_MAX_NUH_LAYER_ID))
+ {
+ block_Release(p_frag);
+ return NULL;
+ }
if(b_header)
{
h266_sequence_parameter_set_t *p_sps = NULL;
=====================================
modules/packetizer/h266_nal.h
=====================================
@@ -46,7 +46,7 @@ enum h266_general_profile_idc_e
#define H266_CONSTRAINT_BYTES(bits) (((bits)+7)/8)
#define H266_MAX_CONSTRAINT_BYTES H266_CONSTRAINT_BYTES(H266_MIN_CONSTRAINT_BITS + \
H266_MAX_CONSTRAINT_ADDITIONAL_BITS)
-#define H266_MAX_NUH_LAYER_ID 55
+#define H266_MAX_NUH_LAYER_ID 55 /* values 56-63 are reserved */
#define H266_MAX_NUM_PTL_SUBLAYERS 7
#define H266_MAX_NUM_SUBLAYERS (1+H266_MAX_NUM_PTL_SUBLAYERS)
#define H266_MAX_NUM_SUB_PROFILES 256
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fd8956212eb6d81fedf5a8d8f09e7e1754c4221c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fd8956212eb6d81fedf5a8d8f09e7e1754c4221c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list