2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

Protect call to setlocale() with HAVE_SETLOCALE

This commit is contained in:
Todd C. Miller 2011-01-05 16:27:44 -05:00
parent 42f7a6c251
commit f09bbcb6bb

View File

@ -245,7 +245,9 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file,
buf = erealloc(buf, psize);
buf[psize - 1] = '\0';
} while (!strftime(buf, psize, path, timeptr) || buf[psize - 1] != '\0');
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
if (slashp)
*slashp = buf + (*slashp - path);
efree(path);