libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are...
authorStefan Metzmacher <metze@samba.org>
Mon, 1 Feb 2010 14:18:15 +0000 (15:18 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 1 Feb 2010 14:23:32 +0000 (15:23 +0100)
metze

libcli/nbt/nbtname.c

index 792b340618e73c6df3318553e424c3db674cc968..136379a313f9e54ee562e59ef0b64a03f0d17b76 100644 (file)
@@ -173,9 +173,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_string(struct ndr_push *ndr, int ndr_fla
                complen = strcspn(s, ".");
 
                /* we need to make sure the length fits into 6 bytes */
-               if (complen >= 0x3F) {
+               if (complen > 0x3F) {
                        return ndr_push_error(ndr, NDR_ERR_STRING,
-                                             "component length %u[%08X] > 0x00003F",
+                                             "component length %u[%08X] > 0x0000003F",
                                              (unsigned)complen, (unsigned)complen);
                }