diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2024-09-19 15:51:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 15:51:57 +0200 |
| commit | 362ec6c92dbc0f563810fafe552e4fa0d9fde024 (patch) | |
| tree | 525e6a58728c728bf342c46628af4e04e749935e | |
| parent | e0e0c8026a9280afa6c375464dccac12106971f0 (diff) | |
| parent | f6ea97aa3688a7e71ff16a1a674940f8b9c55018 (diff) | |
Merge pull request #1555 from hleft/master
bench_dwt: Add assert for memory allocation failure
| -rw-r--r-- | src/lib/openjp2/bench_dwt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/openjp2/bench_dwt.c b/src/lib/openjp2/bench_dwt.c index 4f2ea9fb..ee70c405 100644 --- a/src/lib/openjp2/bench_dwt.c +++ b/src/lib/openjp2/bench_dwt.c @@ -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) { |
