From c5ec3aec545481f78601935845e1fff58963f2e1 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Wed, 26 Mar 2014 12:50:39 +0100 Subject: [PATCH] Red Hat issue 1022062: strcpy misuse in xiosetsockaddrenv_ip4() --- CHANGES | 2 ++ xio-ip4.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9b39db8..89e7d07 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,8 @@ corrections: On big endian platforms with type long >32bit the range option applied a bad base address. Thanks to hejia hejia for reporting and fixing this bug. + + Red Hat issue 1022062: strcpy misuse in xiosetsockaddrenv_ip4() Red Hat issue 1022048: strncpy hardening: corrected suspicious strncpy() uses diff --git a/xio-ip4.c b/xio-ip4.c index a02623e..0e41d3f 100644 --- a/xio-ip4.c +++ b/xio-ip4.c @@ -108,8 +108,7 @@ xiosetsockaddrenv_ip4(int idx, char *namebuff, size_t namelen, switch (idx) { case 0: strcpy(namebuff, "ADDR"); - strcpy(valuebuff, - inet4addr_info(ntohl(sa->sin_addr.s_addr), valuebuff, valuelen)); + inet4addr_info(ntohl(sa->sin_addr.s_addr), valuebuff, valuelen); switch (ipproto) { case IPPROTO_TCP: case IPPROTO_UDP: