Skip to content

Commit

Permalink
Merge pull request #1555 from hleft/master
Browse files Browse the repository at this point in the history
bench_dwt: Add assert for memory allocation failure
  • Loading branch information
rouault authored Sep 19, 2024
2 parents e0e0c80 + f6ea97a commit 362ec6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/openjp2/bench_dwt.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void init_tilec(opj_tcd_tilecomp_t * l_tilec,
nValues = (size_t)(l_tilec->x1 - l_tilec->x0) *
(size_t)(l_tilec->y1 - l_tilec->y0);
l_tilec->data = (OPJ_INT32*) opj_malloc(sizeof(OPJ_INT32) * nValues);
assert(l_tilec->data != NULL);
for (i = 0; i < nValues; i++) {
OPJ_INT32 val = getValue((OPJ_UINT32)i);
if (irreversible) {
Expand Down

0 comments on commit 362ec6c

Please sign in to comment.