]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.3 patch 13: fix technically undefined behavior when comparing return value...
authorChet Ramey <chet.ramey@case.edu>
Wed, 10 Jun 2026 12:56:30 +0000 (08:56 -0400)
committerChet Ramey <chet.ramey@case.edu>
Wed, 10 Jun 2026 12:56:30 +0000 (08:56 -0400)
builtins/read.def
patchlevel.h

index 5135e2b11ba0ccebe7585c635c90699c78ddd1a5..854b7b8fb62c24e35e90959ab1486184daf2ea13 100644 (file)
@@ -788,8 +788,11 @@ read_builtin (WORD_LIST *list)
          char *x;
          x = (char *)xrealloc (input_string, size += 128);
 
-         /* Only need to change unwind-protect if input_string changes */
+#if 0
+         /* This is, in theory, undefined behavior, since input_string may
+            have been freed. */
          if (x != input_string)
+#endif
            {
              input_string = x;
              remove_unwind_protect ();
index 8020b32323f9f3a6836cfd67aa442bf65d53aa09..492f98f75ef4482c6ef2b93c667e3f73a3d61330 100644 (file)
@@ -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 12
+#define PATCHLEVEL 13
 
 #endif /* _PATCHLEVEL_H_ */