diff --git a/crypto/buf/buf.c b/crypto/buf/buf.c index 13b5cebda..b918f01f1 100644 --- a/crypto/buf/buf.c +++ b/crypto/buf/buf.c @@ -220,7 +220,7 @@ size_t BUF_strlcat(char *dst, const char *src, size_t dst_size) { void *BUF_memdup(const void *data, size_t dst_size) { void *ret; - if (data == NULL) { + if (dst_size == 0) { return NULL; }