From: Stefan Metzmacher <metze@samba.org>
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 4 Feb 2010 23:17:17 +0000 (23:17 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 4 Feb 2010 23:17:17 +0000 (23:17 +0000)
Subject: [PATCH 4/7] packet-winsrepl.c: handle the strange alignment after
names

metze

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31795 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-winsrepl.c

index 4191b7d18e22dfa6257b30a84313d693fe2b7c6c..57044f67d8035e0cc76d5ba50f505b9cc0faddb7 100644 (file)
@@ -434,7 +434,11 @@ dissect_winsrepl_wins_name(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
        winsrepl_offset += name_len;
 
        /* ALIGN to 4 Byte */
-       winsrepl_offset += ((winsrepl_offset & (4-1)) == 0 ? 0 : (4 - (winsrepl_offset & (4-1))));
+       /* winsrepl_offset += ((winsrepl_offset & (4-1)) == 0 ? 0 : (4 - (winsrepl_offset & (4-1)))); */
+       /* Windows including w2k8 add 4 padding bytes, when it's already 4 byte
+        * alligned... This happens when the name has a "scope" part
+        */
+       winsrepl_offset += 4 - (winsrepl_offset & (4-1));
 
        /* FLAGS */
        /*