Ethereal-dev: [Ethereal-dev] patch for packet-smb.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Tim Potter <tpot@xxxxxxxxxxx>
Date: Tue, 19 Jun 2001 15:57:31 +1000 (EST)
Hello.  Here's a patch to fix the decoding of a smb negprot
response.  The domain name at the end of the packet is always in
ascii format, regardless of whether unicode strings are
negotiated beforehand.


Tim.

--- packet-smb.c	2001/06/18 02:17:52	1.84
+++ packet-smb.c	2001/06/19 05:38:26
@@ -3506,21 +3506,12 @@
 
     }
 
-    /* The domain, a null terminated string; Unicode if "caps" has
-       the 0x0004 bit set, ASCII (OEM character set) otherwise.
-       XXX - for now, we just handle the ISO 8859-1 subset of Unicode. */
+    /* The domain, a null terminated string */
 
     str = pd + offset;
 
     if (tree) {
-
-      if (caps & 0x0004) {
-      	ustr = unicode_to_str(str, &ustr_len);
-	proto_tree_add_text(tree, NullTVB, offset, ustr_len+2, "OEM domain name: %s", ustr);
-      } else {
 	proto_tree_add_text(tree, NullTVB, offset, strlen(str)+1, "OEM domain name: %s", str);
-      }
-
     }
 
     break;