1
0
mirror of https://github.com/moparisthebest/socat synced 2024-11-14 21:15:01 -05:00

Red Hat issue 1021972: fixed a missing NUL termination in return string of sysutils.c:sockaddr_info() for the AF_UNIX case

This commit is contained in:
Gerhard Rieger 2014-01-12 21:40:25 +01:00
parent a214cbca6f
commit 82231ad799
2 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,9 @@ corrections:
Red Hat issue 1021958: fixed a bug with faulty buffer/data length Red Hat issue 1021958: fixed a bug with faulty buffer/data length
calculation in xio-ascii.c:_xiodump() calculation in xio-ascii.c:_xiodump()
Red Hat issue 1021972: fixed a missing NUL termination in return string
of sysutils.c:sockaddr_info() for the AF_UNIX case
porting: porting:
Performed changes for Fedora release 19 Performed changes for Fedora release 19

View File

@ -1,5 +1,5 @@
/* source: sysutils.c */ /* source: sysutils.c */
/* Copyright Gerhard Rieger 2001-2011 */ /* Copyright Gerhard Rieger */
/* Published under the GNU General Public License V.2, see file COPYING */ /* Published under the GNU General Public License V.2, see file COPYING */
/* translate socket addresses into human readable form */ /* translate socket addresses into human readable form */
@ -189,7 +189,7 @@ char *sockaddr_info(const struct sockaddr *sa, socklen_t salen, char *buff, size
case 0: case 0:
case AF_UNIX: sockaddr_unix_info(&sau->un, salen, cp+1, blen-1); case AF_UNIX: sockaddr_unix_info(&sau->un, salen, cp+1, blen-1);
cp[0] = '"'; cp[0] = '"';
*strchr(cp+1, '\0') = '"'; strncat(cp+1, "\"", 1);
break; break;
#endif #endif
#if WITH_IP4 #if WITH_IP4