more
authorStefan Metzmacher <metze@samba.org>
Tue, 21 Nov 2017 16:15:53 +0000 (17:15 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2018 14:09:07 +0000 (16:09 +0200)
Change-Id: I2f04554f7b3782bb8e3e8a0220b7ca73da425712

epan/dissectors/packet-nmf.c

index fe90c458bdbddde6b47e1e549d3c18a95af3a94e..cb6e26e74cc56f825902eb922db32fcd5a06c956 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;