summaryrefslogtreecommitdiff
path: root/plugins/wimaxasncp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-14 16:02:25 +0200
committerAnders Broman <a.broman58@gmail.com>2015-06-15 10:55:35 +0000
commitc11a912b6ff39f45eae3b3b8075e87b5c96d1a20 (patch)
treeddec9503cad72a63a0c06d5c0323b34d8671f7b6 /plugins/wimaxasncp
parent7102a06811ab63e0433ac91ad242e02c5668d259 (diff)
downloadwireshark-c11a912b6ff39f45eae3b3b8075e87b5c96d1a20.tar.gz
icmp,wimax: Fix undefined shift
Fixes these warnings reported by Undefined Behavior Sanitizer (UBSan) while running the test suite: icmp: left shift of 55099 by 16 places cannot be represented in type 'int' wimax: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I72913a901b61033098750da9c8f1617b055999a1 Reviewed-on: https://code.wireshark.org/review/8913 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/wimaxasncp')
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l
index bf7a1027d4..ee8a2b4bfc 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/wimaxasncp/wimaxasncp_dict.l
@@ -473,7 +473,7 @@ static void wimaxasncp_dict_debug(const gchar *fmt, ...) {
static guint wimaxasncp_bits(guint bits, char *n)
{
- return 1 << ((bits - 1) - (strtoul(n, NULL, 10)));
+ return 1u << ((bits - 1) - (strtoul(n, NULL, 10)));
}
static const value_string wimaxasncp_decode_type_vals[] =