Skip to content

Commit

Permalink
Fixes #381.
Browse files Browse the repository at this point in the history
Added a missing check to the jpc_dec_process_sod function of the JPC codec.
Added another image to the test set.
  • Loading branch information
mdadams committed Mar 29, 2024
1 parent 6f61244 commit 6d084c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added data/test/bad/318.jpc
Binary file not shown.
4 changes: 3 additions & 1 deletion src/libjasper/jpc/jpc_dec.c
Expand Up @@ -611,7 +611,9 @@ static int jpc_dec_process_sod(jpc_dec_t *dec, jpc_ms_t *ms)
if (dec->pkthdrstreams) {
/* Get the stream containing the packet header data for this
tile-part. */
if (!(tile->pkthdrstream = jpc_streamlist_remove(dec->pkthdrstreams, 0))) {
if (jpc_streamlist_numstreams(dec->pkthdrstreams) != 0 &&
!(tile->pkthdrstream = jpc_streamlist_remove(dec->pkthdrstreams,
0))) {
return -1;
}
}
Expand Down

0 comments on commit 6d084c5

Please sign in to comment.