Wireshark-bugs: [Wireshark-bugs] [Bug 11387] Destination address for ZigBee packets have wrong c

Date: Tue, 21 Jul 2015 12:11:18 +0000

changed bug 11387


What Removed Added
CC   [email protected], [email protected]

Comment # 3 on bug 11387 from
For some reason it looks like the pinfo->pool wmem memory block created in
dissect_zbee_nwk_full() function gets freed (or corrupted?) before displaying
either the pinfo->src or pinfo->dst address.

The corresponding code in packet-zbee-nwk.c is:
    /* Display the destination address. */
    if (   (packet.dst == ZBEE_BCAST_ALL)
        || (packet.dst == ZBEE_BCAST_ACTIVE)
        || (packet.dst == ZBEE_BCAST_ROUTERS)){
        dst_addr = wmem_strdup_printf(pinfo->pool, "Broadcast");
    }
    else {
        dst_addr = wmem_strdup_printf(pinfo->pool, "0x%04x", packet.dst);
    }

    SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, (int)strlen(dst_addr)+1,
dst_addr);
    COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst);

    proto_item_append_text(proto_root, ", Dst: %s", dst_addr);
    col_append_fstr(pinfo->cinfo, COL_INFO, ", Dst: %s", dst_addr);

Accodring to doc/README.wmem, using such scope for AT_STRINGZ is valid. And if
I use file scope instead of pinfo scope, there is no data corruption.

Evan, do you know if GTK UI might free pinfo->pool blocks too early?


You are receiving this mail because:
  • You are watching all bug changes.