more
authorStefan Metzmacher <metze@samba.org>
Tue, 21 Nov 2017 16:15:53 +0000 (17:15 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 20 Jan 2019 22:14:58 +0000 (23:14 +0100)
Change-Id: I2f04554f7b3782bb8e3e8a0220b7ca73da425712

epan/dissectors/packet-nmf.c

index fe90c45..cb6e26e 100644 (file)
@@ -116,6 +116,7 @@ dissect_nmf_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offs
        offset += 1;
 
        col_append_str(pinfo->cinfo, COL_INFO, record_name);
+       proto_item_set_text(record_item, "%s", record_name);
 
        switch (record_type) {
        case NMF_VERSION_RECORD:
@@ -172,12 +173,12 @@ dissect_nmf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, _U_ void
        }
 
        while (len > 0) {
-               int ret = dissect_nmf_record(tvb, pinfo, tree, offset);
-               if (ret <= 0) {
+               int start_offset = offset;
+               offset = dissect_nmf_record(tvb, pinfo, tree, offset);
+               if (offset <= 0) {
                        return -1;
                }
-               offset += ret;
-               len -= ret;
+               len -= (offset - start_offset);
        }
 
        return offset;