Reintroduce the malformatting check for SOI markers in the JPEG decoder.