projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
edc08b7
)
Fix potential buffer overflow reading the PID file.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 10 Nov 2012 22:09:31 +0000
(23:09 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 10 Nov 2012 22:09:31 +0000
(23:09 +0100)
Found by cppcheck.
src/tincctl.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
2de89e8
..
344aa97
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-57,7
+57,7
@@
static char *name = NULL;
static char *identname = NULL; /* program name for syslog */
static char *pidfilename = NULL; /* pid file location */
static char *confdir = NULL;
static char *identname = NULL; /* program name for syslog */
static char *pidfilename = NULL; /* pid file location */
static char *confdir = NULL;
-static char controlcookie[102
4
];
+static char controlcookie[102
5
];
char *netname = NULL;
char *confbase = NULL;
static char *tinc_conf = NULL;
char *netname = NULL;
char *confbase = NULL;
static char *tinc_conf = NULL;
@@
-708,8
+708,8
@@
static bool connect_tincd(bool verbose) {
return false;
}
return false;
}
- char host[12
8
];
- char port[12
8
];
+ char host[12
9
];
+ char port[12
9
];
if(fscanf(f, "%20d %1024s %128s port %128s", &pid, controlcookie, host, port) != 4) {
if(verbose)
if(fscanf(f, "%20d %1024s %128s port %128s", &pid, controlcookie, host, port) != 4) {
if(verbose)