[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-91-g0c63e14
[email protected] (Tim Ruehsen) Sat, 29 Feb 2020 13:01:44 -0500 (EST)
| Newsgroups | gmane.comp.gnu.inetutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
--===============5317728735067706609==
Content-Type: text/plain
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 0c63e144a55e5d81695bc5b881696d9210e9df42 (commit)
from 961fcfa007a8fb1ee66454e0fe23f674e96756f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=0c63e144a55e5d81695bc5b881696d9210e9df42
commit 0c63e144a55e5d81695bc5b881696d9210e9df42
Author: Tim Rühsen <[email protected]>
Date: Sat Feb 29 19:01:40 2020 +0100
ftp: Fix strncpy misuse (leading to buffer overflow)
diff --git a/ftp/ftp.c b/ftp/ftp.c
index 7fe99ab..061eccb 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -171,9 +171,10 @@ hookup (char *host, int port)
}
if (res->ai_canonname)
- strncpy (hostnamebuf, res->ai_canonname, sizeof (hostnamebuf));
+ strncpy (hostnamebuf, res->ai_canonname, sizeof (hostnamebuf) - 1);
else
- strncpy (hostnamebuf, rhost, sizeof (hostnamebuf));
+ strncpy (hostnamebuf, rhost, sizeof (hostnamebuf) - 1);
+ hostnamebuf[sizeof (hostnamebuf) - 1] = 0;
hostname = hostnamebuf;
free (rhost);
-----------------------------------------------------------------------
Summary of changes:
ftp/ftp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU Inetutils
--===============5317728735067706609==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KQ29tbWl0LWlu
ZXR1dGlscyBtYWlsaW5nIGxpc3QKQ29tbWl0LWluZXR1dGlsc0BnbnUub3JnCmh0dHBzOi8vbGlz
dHMuZ251Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL2NvbW1pdC1pbmV0dXRpbHMK
--===============5317728735067706609==--