mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
CVE-2012-4560: Fix a write one past the end of the 'u' buffer.
This commit is contained in:
@@ -659,7 +659,7 @@ char *ssh_path_expand_tilde(const char *d) {
|
||||
size_t s = p - d;
|
||||
char u[128];
|
||||
|
||||
if (s > sizeof(u)) {
|
||||
if (s >= sizeof(u)) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(u, d, s);
|
||||
|
||||
Reference in New Issue
Block a user