Don't pass random sun_len for the BSD's,
zero the whole structure as recommended for portability.
Reported by Coverity.
gdbsupport/ChangeLog:
* agent.cc (gdb_connect_sync_socket): Preinitialize addr with zeros.
+2020-10-01 Kamil Rytarowski <n54@gmx.com>
+
+ * agent.cc (gdb_connect_sync_socket): Preinitialize addr with zeros.
+
2020-09-29 Pedro Alves <pedro@palves.net>
* valid-expr.h (CHECK_VALID_EXPR_INT): Make archetype a template
* acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
Makefile.am, Makefile.in, README: New files.
* Moved from ../gdb/gdbsupport/
-
gdb_connect_sync_socket (int pid)
{
#ifdef HAVE_SYS_UN_H
- struct sockaddr_un addr;
+ struct sockaddr_un addr = {};
int res, fd;
char path[UNIX_PATH_MAX];