about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2019-03-14 10:40:27 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2019-03-14 09:46:23 +0000
commit00e6ab70b89f6d95c38322b12aef94408e486336 (patch)
treee0e924e9f951f368408e9b18dd9cdd044dcd24cd /Src
parent632023acc2feed519659926bf320d303562a5713 (diff)
downloadzsh-00e6ab70b89f6d95c38322b12aef94408e486336.tar.gz
zsh-00e6ab70b89f6d95c38322b12aef94408e486336.tar.xz
zsh-00e6ab70b89f6d95c38322b12aef94408e486336.zip
44122: turn int into long to avoid overflow
Diffstat (limited to 'Src')
-rw-r--r--Src/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 83383f10c..22e553a16 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -414,10 +414,10 @@ ecstrcode(char *s)
 	return c;
     } else {
 	Eccstr p, *pp;
-	int cmp;
+	long cmp;
 
 	for (pp = &ecstrs; (p = *pp); ) {
-	    if (!(cmp = p->nfunc - ecnfunc) && !(cmp = (((signed)p->hashval) - ((signed)val))) && !(cmp = strcmp(p->str, s))) {
+	    if (!(cmp = p->nfunc - ecnfunc) && !(cmp = (((long)p->hashval) - ((long)val))) && !(cmp = strcmp(p->str, s))) {
 		return p->offs;
             }
 	    pp = (cmp < 0 ? &(p->left) : &(p->right));