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

CVE-2018-10858: libsmb: Harden smbc_readdir_internal() against returns from malicious servers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13453

CVE-2018-10858: Insufficient input validation on client directory
		listing in libsmbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison
2018-06-15 15:08:17 -07:00
committed by Karolin Seeger
parent 6936d3e2f2
commit 2711b6600e
2 changed files with 51 additions and 8 deletions

View File

@@ -173,7 +173,7 @@ smbc_urlencode(char *dest,
}
}
if (max_dest_len == 0) {
if (max_dest_len <= 0) {
/* Ensure we return -1 if no null termination. */
return -1;
}