aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2020-02-07 11:47:27 +0100
committerAnders Broman <a.broman58@gmail.com>2020-02-08 09:39:26 +0000
commit02199970d7e7e3e210bf49f85075a53b9243eb17 (patch)
tree22c95edabd68c0c2ab9e7e7d2ce0c29c8f79897e /epan
parent0dd91d64da0984cbcd38b48018e7ba960c4104b8 (diff)
SMB2: store file names longer than 256 bytes
File names can be longer than 256 bytes and still be sane. Fixes filenames being reported as "[unknown]". Change-Id: I3425d3106cf6ef63e298c2e73a063a207a4d4aea Reviewed-on: https://code.wireshark.org/review/36045 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-smb2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 2d468ed461..59d5c08725 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -8577,7 +8577,7 @@ dissect_smb2_create_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
si->saved->extra_info = NULL;
si->saved->extra_info_type = SMB2_EI_NONE;
}
- if (si->saved && f_olb.len < 256) {
+ if (si->saved && f_olb.len < 1024) {
si->saved->extra_info_type = SMB2_EI_FILENAME;
si->saved->extra_info = (gchar *)wmem_alloc(wmem_file_scope(), f_olb.len+1);
g_snprintf((gchar *)si->saved->extra_info, f_olb.len+1, "%s", fname);