Wireshark-bugs: [Wireshark-bugs] [Bug 7932] Display Filter for GSM DTAP APN

Date: Mon, 29 Oct 2012 05:47:37 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7932

--- Comment #2 from Anders Broman <anders.broman@xxxxxxxxxxxx> 2012-10-29 05:47:37 PDT ---
We should probably have a generic char *tvb_apn_name_to_str()
in epan/to_str.c or epan/address_to_str.c

based on the code in packet-gtpv2.c dissect_gtpv2_apn()

    if (length > 0) {
        name_len = tvb_get_guint8(tvb, offset);

        if (name_len < 0x20) {
            apn = tvb_get_ephemeral_string(tvb, offset + 1, length - 1);
            for (;;) {
                if (name_len >= length - 1)
                    break;
                tmp = name_len;
                name_len = name_len + apn[tmp] + 1;
                apn[tmp] = '.';
            }
        } else{
            apn = tvb_get_ephemeral_string(tvb, offset, length);
        }
        /*proto_tree_add_string(tree, hf_gtpv2_apn, tvb, offset, length,
apn);*/
        return apn;
    }
+    return ""; <-- new or return NULL?

please use diff -u that makes it easier to see the difference.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.