diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-01-06 08:42:12 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-01-06 08:42:12 +0000 |
commit | a22e5bb83ae87cf48c24a2653363727e9bd07b12 (patch) | |
tree | 70891a98454c72433c72480e2cd2521fc1685cad /security/gvm-libs/files/patch-osp_osp.c | |
parent | - Connect security/py-python-gvm (diff) |
- New port: security/gvm-libs
This is the libraries module for the Greenbone Vulnerability Management
Solution.
It is used for the Greenbone Security Manager appliances and provides various
functionalities to support the integrated service daemons.
WWW: https://github.com/greenbone/gvm-libs
Notes
Notes:
svn path=/head/; revision=560472
Diffstat (limited to 'security/gvm-libs/files/patch-osp_osp.c')
-rw-r--r-- | security/gvm-libs/files/patch-osp_osp.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/security/gvm-libs/files/patch-osp_osp.c b/security/gvm-libs/files/patch-osp_osp.c new file mode 100644 index 000000000000..a9cae258b0e4 --- /dev/null +++ b/security/gvm-libs/files/patch-osp_osp.c @@ -0,0 +1,22 @@ +--- osp/osp.c 2021-01-03 15:42:39.761321000 -0500 ++++ osp/osp.c 2021-01-03 15:48:50.962832000 -0500 +@@ -134,7 +134,6 @@ + if (host && *host == '/') + { + struct sockaddr_un addr; +- int len; + + connection = g_malloc0 (sizeof (*connection)); + connection->socket = socket (AF_UNIX, SOCK_STREAM, 0); +@@ -142,9 +141,8 @@ + return NULL; + + addr.sun_family = AF_UNIX; +- strncpy (addr.sun_path, host, sizeof (addr.sun_path) - 1); +- len = strlen (addr.sun_path) + sizeof (addr.sun_family); +- if (connect (connection->socket, (struct sockaddr *) &addr, len) == -1) ++ strcpy (addr.sun_path, host); ++ if (connect (connection->socket, (struct sockaddr *) &addr, sizeof(struct sockaddr_un)) == -1) + { + close (connection->socket); + return NULL; |