image/jpeg: more bounds checking and skip malformed APP0

Also increase the maximum huffman symbols to 176
This commit is contained in:
Hisham Aburaqibah
2025-09-08 17:13:03 +02:00
committed by Jeroen van Rijn
parent 8644f3beba
commit 694593c5f2
2 changed files with 26 additions and 15 deletions
+1
View File
@@ -600,6 +600,7 @@ JPEG_Error :: enum {
Encountered_RST_Marker_Outside_ECS,
Extra_Data_After_SOS, // Image seemed to have decoded okay, but there's more data after SOS
Invalid_Thumbnail_Size,
Huffman_Symbols_Exceeds_Max,
}
JFIF_Unit :: enum byte {