From 26a95b35414d0d4b729f3fd5da010debb70b412b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 1 Nov 2024 00:48:57 +0100 Subject: Fix check --- src/work.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/work.c b/src/work.c index 06b0eb8..6e658db 100644 --- a/src/work.c +++ b/src/work.c @@ -126,7 +126,7 @@ process_file(const char *locl_filename, unsigned char **locl_buf) for (;;) { ptrdiff_t want = nw + st.st_blksize; if (want > basecap) { - if (want & ((ptrdiff_t)1 << (PTRDIFF_WIDTH - 1))) { + if (want & ((ptrdiff_t)1 << (PTRDIFF_WIDTH - 2))) { errno = EOVERFLOW; cerr(EXIT_FATAL, "%s:", __func__); } -- cgit v1.2.3