Return to util.c CVS log | Up to [local] / src / usr.bin / ftp |
version 1.74, 2015/10/18 03:39:37 | version 1.75, 2015/10/18 03:41:14 | ||
---|---|---|---|
|
|
||
if (*ftemp == NULL) { | if (*ftemp == NULL) { | ||
int len; | int len; | ||
cp = _PATH_TMP; | if ((cp = getenv("TMPDIR")) == NULL || *cp == '\0') | ||
cp = _PATH_TMP; | |||
len = strlen(cp); | len = strlen(cp); | ||
if (len + sizeof(TMPFILE) + (cp[len-1] != '/') > sizeof(temp)) { | if (len + sizeof(TMPFILE) + (cp[len-1] != '/') > sizeof(temp)) { | ||
warnx("unable to create temporary file: %s", | warnx("unable to create temporary file: %s", |