rcolebaugh / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash-4.4-patch-8.patch

9014c4
From b9f81c2977b82490cd4dc70b0bb292bfbf86bd2c Mon Sep 17 00:00:00 2001
9014c4
From: Chet Ramey <chet.ramey@case.edu>
9014c4
Date: Fri, 20 Jan 2017 15:38:10 -0500
9014c4
Subject: [PATCH] Bash-4.4 patch 8
9014c4
9014c4
---
9014c4
 expr.c       | 15 +++++++++------
9014c4
 patchlevel.h |  2 +-
9014c4
 2 files changed, 10 insertions(+), 7 deletions(-)
9014c4
9014c4
diff --git a/expr.c b/expr.c
9014c4
index 1ddb693..172964a 100644
9014c4
--- a/expr.c
9014c4
+++ b/expr.c
9014c4
@@ -578,24 +578,23 @@ expcond ()
9014c4
   rval = cval = explor ();
9014c4
   if (curtok == QUES)		/* found conditional expr */
9014c4
     {
9014c4
-      readtok ();
9014c4
-      if (curtok == 0 || curtok == COL)
9014c4
-	evalerror (_("expression expected"));
9014c4
       if (cval == 0)
9014c4
 	{
9014c4
 	  set_noeval = 1;
9014c4
 	  noeval++;
9014c4
 	}
9014c4
 
9014c4
+      readtok ();
9014c4
+      if (curtok == 0 || curtok == COL)
9014c4
+	evalerror (_("expression expected"));
9014c4
+
9014c4
       val1 = EXP_HIGHEST ();
9014c4
 
9014c4
       if (set_noeval)
9014c4
 	noeval--;
9014c4
       if (curtok != COL)
9014c4
 	evalerror (_("`:' expected for conditional expression"));
9014c4
-      readtok ();
9014c4
-      if (curtok == 0)
9014c4
-	evalerror (_("expression expected"));
9014c4
+
9014c4
       set_noeval = 0;
9014c4
       if (cval)
9014c4
  	{
9014c4
@@ -603,7 +602,11 @@ expcond ()
9014c4
 	  noeval++;
9014c4
  	}
9014c4
 
9014c4
+      readtok ();
9014c4
+      if (curtok == 0)
9014c4
+	evalerror (_("expression expected"));
9014c4
       val2 = expcond ();
9014c4
+
9014c4
       if (set_noeval)
9014c4
 	noeval--;
9014c4
       rval = cval ? val1 : val2;
9014c4
diff --git a/patchlevel.h b/patchlevel.h
9014c4
index deb9c5b..16c8740 100644
9014c4
--- a/patchlevel.h
9014c4
+++ b/patchlevel.h
9014c4
@@ -25,6 +25,6 @@
9014c4
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
9014c4
    looks for to find the patch level (for the sccs version string). */
9014c4
 
9014c4
-#define PATCHLEVEL 7
9014c4
+#define PATCHLEVEL 8
9014c4
 
9014c4
 #endif /* _PATCHLEVEL_H_ */
9014c4
-- 
9014c4
2.9.3
9014c4