summaryrefslogtreecommitdiffstats
path: root/XUtils.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-03 00:31:34 +0100
committerBenny Baumann <BenBE@geshi.org>2023-11-03 09:19:18 +0100
commitdc6dc7c8f07dad27611721654bc22e9e011f70f1 (patch)
treeec1f16fa5595ed8d15c23fd84dccfe80e36406e6 /XUtils.c
parenta18a38cff5e8250f43a094ec42cd8497d301b539 (diff)
Safe-guard agains kernel issues
Diffstat (limited to 'XUtils.c')
-rw-r--r--XUtils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/XUtils.c b/XUtils.c
index 214b0565..25fc3bd3 100644
--- a/XUtils.c
+++ b/XUtils.c
@@ -289,6 +289,8 @@ static ssize_t readfd_internal(int fd, void* buffer, size_t count) {
}
if (res > 0) {
+ assert(res <= count);
+
buffer = ((char*)buffer) + res;
count -= (size_t)res;
alreadyRead += res;

© 2014-2024 Faster IT GmbH | imprint | privacy policy