bootp: try to fix OSX builtbot
authorMartin Mathieson <martin.r.mathieson@googlemail.com>
Fri, 3 Jul 2015 21:16:51 +0000 (22:16 +0100)
committerMartin Mathieson <martin.r.mathieson@googlemail.com>
Fri, 3 Jul 2015 21:17:56 +0000 (21:17 +0000)
Change-Id: I0204b6c947e302a6f38b43593e19c6b816a180a4
Reviewed-on: https://code.wireshark.org/review/9482
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
epan/dissectors/packet-bootp.c

index a659a8b7beb44756d5c9e6b44327f9fa8c755177..87568d9681e18846e8a4ebb1245cf2fd2bf72ffd 100644 (file)
@@ -3665,8 +3665,8 @@ dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree
                        else if (o125_tr111_opt[subopt].ftype == oui) {
                                /* Get hex string.  Expecting 6 characters. */
                                gchar   *oui_string =  tvb_get_string_enc(wmem_packet_scope(), tvb, suboptoff, subopt_len, ENC_ASCII);
-                               /* Convert to OUI number */
-                               long oui_number = strtol(oui_string, NULL, 16);
+                               /* Convert to OUI number.  Only 3 bytes so no data lost in downcast. */
+                               guint32 oui_number = (guint32)strtol(oui_string, NULL, 16);
                                /* Add item using oui_vals */
                                proto_tree_add_uint(v_tree, *o125_tr111_opt[subopt].phf, tvb, suboptoff, subopt_len, oui_number);
                        } else if (o125_tr111_opt[subopt].phf == NULL)