gcc 8 noticed that snprintf could have overrun it.
char **argp, **arguments;
struct stat st;
char cwd[PATH_MAX + 1]; /* current working directory */
char **argp, **arguments;
struct stat st;
char cwd[PATH_MAX + 1]; /* current working directory */
- char file[PATH_MAX + 1]; /* file name buffer */
char shell[PATH_MAX + 1]; /* shell response buffer */
FILE *f; /* read pointer for bgnd proc */
char *l; /* set on -l to alist command */
char shell[PATH_MAX + 1]; /* shell response buffer */
FILE *f; /* read pointer for bgnd proc */
char *l; /* set on -l to alist command */
*/
if ((f = popen_in_dir(cwd, buf, "r")) != NULL) {
*/
if ((f = popen_in_dir(cwd, buf, "r")) != NULL) {
+ char file[2 * PATH_MAX + 2]; /* file name buffer */
+
while (fgets(shell, sizeof (shell), f) != NULL) {
char *ctype;
while (fgets(shell, sizeof (shell), f) != NULL) {
char *ctype;