Skip to content

Commit

Permalink
Merge pull request #17303 from Snuffleupagus/issue-17302
Browse files Browse the repository at this point in the history
Throw a `JpegError` when a JPEG image has no frame data (issue 17302)
  • Loading branch information
Snuffleupagus authored Nov 20, 2023
2 parents d8424a4 + a6f0609 commit 086a592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/jpg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 086a592

Please sign in to comment.