From 086693d039591f602493b108ae3bb49279067002 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Sat, 1 Jun 2024 22:21:04 -0300 Subject: [PATCH] don't memcpy NULL --- src/geoarrow/metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geoarrow/metadata.c b/src/geoarrow/metadata.c index 2afa470..536767c 100644 --- a/src/geoarrow/metadata.c +++ b/src/geoarrow/metadata.c @@ -552,7 +552,7 @@ int64_t GeoArrowUnescapeCrs(struct GeoArrowStringView crs, char* out, int64_t n) if (n > crs.size_bytes) { memcpy(out, crs.data, crs.size_bytes); out[crs.size_bytes] = '\0'; - } else { + } else if (out != NULL) { memcpy(out, crs.data, n); }