1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

libcli/nbt: fix ndr_push_nbt_string() string labels with a length of 63 (0x3F) are allowed

metze
This commit is contained in:
Stefan Metzmacher 2010-02-01 15:18:15 +01:00
parent 93142e4a3a
commit e37dc56e97

View 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);
}