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:
committed by
Karolin Seeger
parent
6936d3e2f2
commit
2711b6600e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user