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).
This commit is contained in:
Darren Tucker 2018-09-07 14:06:57 +10:00
parent ea9c06e11d
commit 039bf2a817
1 changed files with 1 additions and 1 deletions

View File

@ -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