summaryrefslogtreecommitdiff
path: root/tools/lemon
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2013-11-28 16:04:33 +0000
committerBalint Reczey <balint@balintreczey.hu>2013-11-28 16:04:33 +0000
commit2ec033d15ece6dc014f533afc4c003ec1efa8073 (patch)
tree93f0a41f19a3011da3f7566535326398eaa1c3e7 /tools/lemon
parentea7bcf078369fef60871f7a99fee0f12656f07d9 (diff)
downloadwireshark-2ec033d15ece6dc014f533afc4c003ec1efa8073.tar.gz
Fix potential signed int overflow in Lemon
This chrashed Solaris buildbot when -ftrapv was enabled. Triaged by Guy Harris, see detail at: http://www.wireshark.org/lists/wireshark-dev/201311/msg00185.html svn path=/trunk/; revision=53624
Diffstat (limited to 'tools/lemon')
-rw-r--r--tools/lemon/lemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c
index 16e1387d95..19a91008cc 100644
--- a/tools/lemon/lemon.c
+++ b/tools/lemon/lemon.c
@@ -4290,9 +4290,9 @@ int SetUnion(char *s1, char *s2)
** Code for processing tables in the LEMON parser generator.
*/
-PRIVATE int strhash(const char *x)
+PRIVATE unsigned int strhash(const char *x)
{
- int h = 0;
+ unsigned int h = 0;
while( *x) h = h*13 + *(x++);
return h;
}