components/ksh93/patches/225-17817727.patch
changeset 4305 90493abe0c5c
parent 4304 b35bb72c479d
child 4307 7ea76682d676
--- a/components/ksh93/patches/225-17817727.patch	Mon May 18 13:04:23 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-This fix is from the community, details in the following location.
-http://lists.research.att.com/pipermail/ast-users/2013q4/004481.html
----
---- a/src/cmd/ksh93/sh/streval.c	2014-01-22 10:39:11.075964500 +0100
-+++ b/src/cmd/ksh93/sh/streval.c	2014-01-22 13:21:35.999184260 +0100
-@@ -366,13 +366,17 @@
- 				num = (Sflong_t)(sp[-1]) / (Sflong_t)(num);
- 			break;
- 		    case A_LSHIFT:
--			if(tp[-1]==2)
-+			if((long)num >= CHAR_BIT*sizeof(Sfulong_t))
-+				num = 0;
-+			else if(tp[-1]==2)
- 				num = U2F((Sfulong_t)(sp[-1]) << (long)(num));
- 			else
- 				num = (Sflong_t)(sp[-1]) << (long)(num);
- 			break;
- 		    case A_RSHIFT:
--			if(tp[-1]==2)
-+			if((long)num >= CHAR_BIT*sizeof(Sfulong_t))
-+				num = 0;
-+			else if(tp[-1]==2)
- 				num = U2F((Sfulong_t)(sp[-1]) >> (long)(num));
- 			else
- 				num = (Sflong_t)(sp[-1]) >> (long)(num);