aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-01-03 11:51:04 +0100
committerEvan Huus <eapache@gmail.com>2014-01-31 16:38:21 +0000
commit7feac746031dfd69456df3c98e09bd1c0a8896c3 (patch)
treefb11d85690027e2e0e7042d0307c8ba61540efef /epan
parent505af30e0156e1ac3db7a411127084d1bca4c0ad (diff)
Revert "In get_unicode_or_ascii_string(), check if the length is odd/even, not the offset. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5778 - Volume label field ... is not displayed correctly ..."
This is wrong it breaks all sort of things. The "Volume label field" is a special case, which can be fixed by using nopad=TRUE. Change-Id: I3cd3f30ff0076d5e31a735391b175fd68e5fa142 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/26 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-smb-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-smb-common.c b/epan/dissectors/packet-smb-common.c
index 71e5e7aeda..3711f1258b 100644
--- a/epan/dissectors/packet-smb-common.c
+++ b/epan/dissectors/packet-smb-common.c
@@ -238,7 +238,7 @@ get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp,
}
if (useunicode) {
- if ((!nopad) && (*bcp % 2)) {
+ if ((!nopad) && (*offsetp % 2)) {
(*offsetp)++; /* Looks like a pad byte there sometimes */
(*bcp)--;