diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 2f8b52ccbd..ccdfc72bbd 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2581,6 +2581,7 @@ like strdup but for memory void *memdup(void *p, size_t size) { void *p2; + if (size == 0) return NULL; p2 = malloc(size); if (!p2) return NULL; memcpy(p2, p, size); |