diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-09-07 14:06:57 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-09-07 14:06:57 +1000 |
commit | 039bf2a81797b8f3af6058d34005a4896a363221 (patch) | |
tree | 8d3beef6e3002e0940259efd730270ff98f5fdc4 /openbsd-compat/setproctitle.c | |
parent | ea9c06e11d2e8fb2f4d5e02f8a41e23d2bd31ca9 (diff) |
Initial len for the fmt=NULL case.
Patch from jjelen at redhat via bz#2687. (OpenSSH never calls
setproctitle with a null format so len is always initialized).
Diffstat (limited to 'openbsd-compat/setproctitle.c')
-rw-r--r-- | openbsd-compat/setproctitle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index 2b15c6e0..dbd1a95a 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -125,7 +125,7 @@ setproctitle(const char *fmt, ...) #if SPT_TYPE != SPT_NONE va_list ap; char buf[1024], ptitle[1024]; - size_t len; + size_t len = 0; int r; extern char *__progname; #if SPT_TYPE == SPT_PSTAT |