From a18a38cff5e8250f43a094ec42cd8497d301b539 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Fri, 3 Nov 2023 00:20:49 +0100 Subject: Ensure the buffer is always terminated --- XUtils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'XUtils.c') diff --git a/XUtils.c b/XUtils.c index 1af0dd4f..214b0565 100644 --- a/XUtils.c +++ b/XUtils.c @@ -284,6 +284,7 @@ static ssize_t readfd_internal(int fd, void* buffer, size_t count) { continue; close(fd); + *((char*)buffer) = '\0'; return -errno; } -- cgit v1.2.3