Skip to content

Commit

Permalink
don't memcpy NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Jun 2, 2024
1 parent e8cc0fd commit 086693d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geoarrow/metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 086693d

Please sign in to comment.