From 4b4181f4acecb7ead9814d5430bb2010a2d1290e Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 19 Mar 2025 11:21:46 +0900 Subject: [PATCH] io-util: add one more assertion for Coverity Fixes CID#1548067. --- src/basic/io-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/basic/io-util.c b/src/basic/io-util.c index f12f6b192c9..7d7f34f2035 100644 --- a/src/basic/io-util.c +++ b/src/basic/io-util.c @@ -86,6 +86,7 @@ ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) { return n; assert((size_t) k <= nbytes); + assert(k <= SSIZE_MAX - n); p += k; nbytes -= k; -- 2.47.3