about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-04-08 14:32:15 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-04-08 14:32:15 +0900
commit60012a2588efcce1d34b6fea604583b5c36200ec (patch)
treee62b32c1d52969032037be8e0d2fd8b8ffa27caa
parenta785a99fa9f8470b01717f568a96cc966a3855e3 (diff)
downloadloftix-60012a2588efcce1d34b6fea604583b5c36200ec.tar.gz
Add patch reverting fix for coreutils#25003
-rw-r--r--patches/bugs/coreutils-unfix-bug-25003.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/bugs/coreutils-unfix-bug-25003.patch b/patches/bugs/coreutils-unfix-bug-25003.patch
new file mode 100644
index 0000000..0a5e4de
--- /dev/null
+++ b/patches/bugs/coreutils-unfix-bug-25003.patch
@@ -0,0 +1,13 @@
+diff --git a/src/split.c b/src/split.c
+index 9a0704c26184..f9c99db43f9b 100644
+--- a/src/split.c
++++ b/src/split.c
+@@ -982,7 +982,7 @@ bytes_chunk_extract (uintmax_t k, uintmax_t n, char *buf, size_t bufsize,
+   start = (k - 1) * (file_size / n);
+   end = (k == n) ? file_size : k * (file_size / n);
+ 
+-  if (start < initial_read)
++  if (initial_read != SIZE_MAX || start < initial_read)
+     {
+       memmove (buf, buf + start, initial_read - start);
+       initial_read -= start;