aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-03-07 14:01:38 -0800
committerGerald Combs <gerald@wireshark.org>2022-03-07 14:01:38 -0800
commit5fc1ed369c84c598727402b1200362d86a7e7585 (patch)
treed499cf3013f20645d583362551332cfec56e803f
parentdae7cb354ff506f1e8e44d95f2b193bd0cf98338 (diff)
USB HID: Initialize some variables.
Fixes #17984.
-rw-r--r--epan/dissectors/packet-usb-hid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-usb-hid.c b/epan/dissectors/packet-usb-hid.c
index 68f52be3f7..0cc912c2e6 100644
--- a/epan/dissectors/packet-usb-hid.c
+++ b/epan/dissectors/packet-usb-hid.c
@@ -4093,7 +4093,7 @@ static int
dissect_usb_hid_report_mainitem_data(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset, unsigned int bSize, unsigned int bTag)
{
proto_item *ti = proto_tree_get_parent(tree);
- guint32 val;
+ guint32 val = 0;
switch (bTag) {
case USBHID_MAINITEM_TAG_INPUT:
@@ -4164,8 +4164,8 @@ dissect_usb_hid_report_globalitem_data(packet_info *pinfo _U_, proto_tree *tree,
{
const char *str = NULL;
proto_item *ti = proto_tree_get_parent(tree);
- guint32 val;
- gint32 val_sig;
+ guint32 val = 0;
+ gint32 val_sig = 0;
switch (bTag) {
case USBHID_GLOBALITEM_TAG_USAGE_PAGE:
@@ -4255,7 +4255,7 @@ dissect_usb_hid_report_localitem_data(packet_info *pinfo, proto_tree *tree, tvbu
guint32 id = 0xffff;
proto_item *ti = proto_tree_get_parent(tree);
gchar *str = NULL;
- guint32 val;
+ guint32 val = 0;
switch (bTag) {
case USBHID_LOCALITEM_TAG_USAGE: