From e37dc56e971f44c00791529a39144d1a972e3ca2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 1 Feb 2010 15:18:15 +0100 Subject: [PATCH] libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are allowed metze --- libcli/nbt/nbtname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c index 792b340618e..136379a313f 100644 --- a/libcli/nbt/nbtname.c +++ b/libcli/nbt/nbtname.c @@ -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); }