Skip to content

Commit

Permalink
label which buffer overrun happened
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Sep 26, 2024
1 parent c81cb26 commit 94d0911
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Libtmp/Compression/ricecomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ unsigned int *diff;
z = output_nbits(buffer, a0, bsize * 8);
if (z) {
free(diff);
return "buffer overrun";
return "buffer overrun (1)";
}
}

Expand Down Expand Up @@ -250,12 +250,12 @@ unsigned int *diff;
*/
if (output_nbits(buffer, fsmax+1, fsbits) ) {
free(diff);
return "buffer overrun";
return "buffer overrun (2)";
}
for (j=0; j<thisblock; j++) {
if (output_nbits(buffer, diff[j], bbits) ) {
free(diff);
return "buffer overrun";
return "buffer overrun (3)";
}
}
} else if (fs == 0 && pixelsum == 0) {
Expand Down Expand Up @@ -320,7 +320,7 @@ unsigned int *diff;
/* check if overflowed output buffer */
if (buffer->current > buffer->end) {
free(diff);
return "buffer overrun";
return "buffer overrun (4)";
}
buffer->bitbuffer = lbitbuffer;
buffer->bits_to_go = lbits_to_go;
Expand Down

0 comments on commit 94d0911

Please sign in to comment.