From: Stefan Metzmacher Date: Mon, 1 Feb 2010 14:18:15 +0000 (+0100) Subject: libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are... X-Git-Tag: tdb-1.2.1~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e37dc56e971f44c00791529a39144d1a972e3ca2;p=thirdparty%2Fsamba.git libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are allowed metze --- 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); }