mirror of
https://repo.or.cz/socat.git
synced 2025-07-08 21:36:34 +00:00
fixed a bug where socat might crash when connecting to a unix domain socket using address GOPEN
This commit is contained in:
parent
a5fc4686a7
commit
4c3d1ca49d
4 changed files with 67 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/* source: xio-gopen.c */
|
||||
/* Copyright Gerhard Rieger 2001-2008 */
|
||||
/* Copyright Gerhard Rieger 2001-2010 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* this file contains the source for opening addresses of generic open type */
|
||||
|
@ -46,7 +46,7 @@ static int xioopen_gopen(int argc, const char *argv[], struct opt *opts, int xio
|
|||
if (exists && S_ISSOCK(st_mode)) {
|
||||
#if WITH_UNIX
|
||||
union sockaddr_union us;
|
||||
socklen_t uslen;
|
||||
socklen_t uslen = sizeof(us);
|
||||
char infobuff[256];
|
||||
|
||||
Info1("\"%s\" is a socket, connecting to it", filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue