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:
parent
93142e4a3a
commit
e37dc56e97
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user