File: bash53-004.diff

package info (click to toggle)
bash 5.3-2
  • links: PTS
  • area: main
  • in suites: sid
  • size: 44,432 kB
  • sloc: ansic: 134,747; sh: 8,866; yacc: 5,966; makefile: 4,697; perl: 4,105; asm: 48; awk: 23; sed: 16
file content (39 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
			     BASH PATCH REPORT
			     =================

Bash-Release:	5.3
Patch-ID:	bash53-004

Bug-Reported-by:	Emanuele Torre <torreemanuele6@gmail.com>
Bug-Reference-ID:	<aHKS0uA8Sf_vMT25@ntoo>
Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00031.html

Bug-Description:

The Linux kernel reports incorrect sizes for files in /sys/block/*/uevent,
leading bash to report a read error when the byte count does not agree
with the file size from fstat(2).

--- a/builtins/evalfile.c
+++ b/builtins/evalfile.c
@@ -160,8 +160,10 @@ file_error_and_exit:
       nr = read (fd, string, file_size);
       if (nr >= 0)
 	string[nr] = '\0';
+#if 0
       if (nr != file_size)
 	nr = -1;		/* XXX - didn't get the whole file */
+#endif
     }
   else
     nr = zmapfd (fd, &string, 0);
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 3
+#define PATCHLEVEL 4
 
 #endif /* _PATCHLEVEL_H_ */