From 1a11c9df6e4d06e049a9e173db46f0a961e9a1a1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 16 Aug 2019 19:59:18 +0200 Subject: [PATCH] setByteArray(): fix previous commit --- libtiff/tif_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c index dd3dd6a6..1e0a76c3 100644 --- a/libtiff/tif_dir.c +++ b/libtiff/tif_dir.c @@ -47,7 +47,7 @@ setByteArray(void** vpp, void* vp, size_t nmemb, size_t elem_size) } if (vp) { tmsize_t bytes = _TIFFMultiplySSize(NULL, nmemb, elem_size, NULL); - if (elem_size) + if (bytes) *vpp = (void*) _TIFFmalloc(bytes); if (*vpp) _TIFFmemcpy(*vpp, vp, bytes);