Skip to content

Commit

Permalink
Fixed a bug in the packet iterator code.
Browse files Browse the repository at this point in the history
Added a new regression test case.
  • Loading branch information
mdadams committed Nov 27, 2016
1 parent da11593 commit f25486c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file added data/test/good/PoC2.jpc
Binary file not shown.
4 changes: 2 additions & 2 deletions src/libjasper/jpc/jpc_t2cod.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ static int jpc_pi_nextrpcl(register jpc_pi_t *pi)
for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno <
picomp->numrlvls; ++rlvlno, ++pirlvl) {
// Check for the potential for overflow problems.
if (pirlvl->prcwidthexpn + pi->picomp->numrlvls >
if (pirlvl->prcwidthexpn + picomp->numrlvls >
JAS_UINTFAST32_NUMBITS - 2 ||
pirlvl->prcheightexpn + pi->picomp->numrlvls >
pirlvl->prcheightexpn + picomp->numrlvls >
JAS_UINTFAST32_NUMBITS - 2) {
return -1;
}
Expand Down

0 comments on commit f25486c

Please sign in to comment.