From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This avoids having to check for !src or !len before calling util_memcpy since otherwise it can cause runtime errors. --- src/shared/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/util.c b/src/shared/util.c index 69abfba31978..89f1a2623cc8 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -221,7 +221,7 @@ int util_iov_memcmp(const struct iovec *iov1, const struct iovec *iov2) void util_iov_memcpy(struct iovec *iov, void *src, size_t len) { - if (!iov) + if (!iov || !src || !len) return; iov->iov_base = realloc(iov->iov_base, len); -- 2.37.3