From edff796a305b09fd991fd8e965d4c83bff91ee39 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 26 Nov 2025 12:46:21 -0500 Subject: [PATCH] Bash-5.3 patch 4: fix issue with source when read(2) returns fewer characters than fstat(2) says are available --- builtins/evalfile.c | 2 ++ patchlevel.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/builtins/evalfile.c b/builtins/evalfile.c index 1fee9880..3026c5f0 100644 --- 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); diff --git a/patchlevel.h b/patchlevel.h index a1609dc8..fa8d6cba 100644 --- 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_ */ -- 2.47.3