Skip to content
Permalink
Browse files

Fixed a bug in the packet iterator code.

Added a new regression test case.
  • Loading branch information...
mdadams committed Nov 27, 2016
1 parent da11593 commit f25486c3d4aa472fec79150f2c41ed4333395d3d
Showing with 2 additions and 2 deletions.
  1. BIN data/test/good/PoC2.jpc
  2. +2 −2 src/libjasper/jpc/jpc_t2cod.c
BIN +569 Bytes data/test/good/PoC2.jpc
Binary file not shown.
@@ -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;
}

0 comments on commit f25486c

Please sign in to comment.
You can’t perform that action at this time.