diff options
author | Sergey Avseyev <sergey.avseyev@gmail.com> | 2017-09-01 11:12:37 +0300 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-09-02 14:08:29 +0000 |
commit | 2330ba1b3d6e62272dbaf0d5b3b5e8481040a45f (patch) | |
tree | b1a02db92eb03a5bf9e89326889fd93ec49574fa /epan/dissectors/packet-couchbase.c | |
parent | 6fb8aa9a81ac7fcda4733d48555b09ca27dfacad (diff) |
couchbase: fix full-doc commands of subdoc
They do not have path, so the min_spec_size should be smaller
Change-Id: I5a77bcf742be5f8a00f0cf7a215f386a845673fa
Reviewed-on: https://code.wireshark.org/review/23349
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-couchbase.c')
-rw-r--r-- | epan/dissectors/packet-couchbase.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c index ffd4b76f2a..ae03779ae5 100644 --- a/epan/dissectors/packet-couchbase.c +++ b/epan/dissectors/packet-couchbase.c @@ -1563,8 +1563,8 @@ dissect_multipath_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (request) { gint min_spec_size; - /* Minimum size is the fixed header plus at least 1 byte for path. */ - min_spec_size = (is_mutation ? 8 : 4) + 1; + /* Minimum size is the fixed header. */ + min_spec_size = (is_mutation ? 8 : 4); while (offset + min_spec_size <= end) { guint32 path_len; @@ -1595,9 +1595,11 @@ dissect_multipath_value(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += 4; } - proto_tree_add_item(multipath_tree, hf_multipath_path, tvb, offset, path_len, - ENC_ASCII | ENC_NA); - offset += path_len; + if (path_len) { + proto_tree_add_item(multipath_tree, hf_multipath_path, tvb, offset, path_len, + ENC_ASCII | ENC_NA); + offset += path_len; + } if (spec_value_len > 0) { proto_tree_add_item(multipath_tree, hf_multipath_value, tvb, offset, |