Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion picojpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,9 @@ static uint8 readSOFMarker(void)
gCompVSamp[i] = (uint8)getBits1(4);
gCompQuant[i] = (uint8)getBits1(8);

if (gCompQuant[i] > 1)
if (i < 2 && gCompQuant[i] > 1) {
return PJPG_UNSUPPORTED_QUANT_TABLE;
}
}

return 0;
Expand Down