Add a check to detect JPEG images that contain an unsupported number of components for VCN (#217)

This commit is contained in:
Aryan Salmanpour
2026-01-12 14:51:46 -08:00
committed by GitHub
parent f7b3567d4c
commit 772c0ee3f5
+1 -1
View File
@@ -330,7 +330,7 @@ bool RocJpegStreamParser::ParseSOS() {
uint32_t num_components = stream_[2];
if (num_components > NUM_COMPONENTS - 1) {
if (num_components > NUM_COMPONENTS - 1 || num_components != jpeg_stream_parameters_.picture_parameter_buffer.num_components) {
ERR("invalid number of component!")
return false;
}