Merge pull request #17303 from Snuffleupagus/issue-17302

Throw a `JpegError` when a JPEG image has no frame data (issue 17302)
This commit is contained in:
Jonas Jenwald 2023-11-20 18:53:35 +01:00 committed by GitHub
commit 086a5921dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1073,6 +1073,9 @@ class JpegImage {
offset += 2;
}
if (!frame) {
throw new JpegError("JpegImage.parse - no frame data found.");
}
this.width = frame.samplesPerLine;
this.height = frame.scanLines;
this.jfif = jfif;