Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb/common CID 1102811: Unitialized v...



details:   https://anonhg.NetBSD.org/src/rev/145b4b68da92
branches:  trunk
changeset: 791349:145b4b68da92
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 14 01:14:39 2013 +0000

description:
CID 1102811: Unitialized variable. Don't pass random sun_len for the BSD's,
zero the whole structure as recommended for portability.

diffstat:

 external/gpl3/gdb/dist/gdb/common/agent.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 4558b6658cca -r 145b4b68da92 external/gpl3/gdb/dist/gdb/common/agent.c
--- a/external/gpl3/gdb/dist/gdb/common/agent.c Thu Nov 14 01:12:14 2013 +0000
+++ b/external/gpl3/gdb/dist/gdb/common/agent.c Thu Nov 14 01:14:39 2013 +0000
@@ -175,6 +175,7 @@
       return -1;
     }
 
+  memset(&addr, 0, sizeof(addr));
   addr.sun_family = AF_UNIX;
 
   res = xsnprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path);



Home | Main Index | Thread Index | Old Index