mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-22 08:53:41 +01:00
Prevent buffer overflow with extra long arguments.
This commit is contained in:
parent
b8cff82d7f
commit
fc1e823247
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39430
@ -36,7 +36,7 @@
|
||||
static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: interactive.c,v 1.5 1998/07/28 06:20:08 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -366,9 +366,7 @@ getnext:
|
||||
* For relative pathnames, prepend the current directory to
|
||||
* it then canonicalize and return it.
|
||||
*/
|
||||
(void) strcpy(output, curdir);
|
||||
(void) strcat(output, "/");
|
||||
(void) strcat(output, rawname);
|
||||
snprintf(output, sizeof(output), "%s/%s", curdir, rawname);
|
||||
canon(output, name, size);
|
||||
}
|
||||
if (glob(name, GLOB_ALTDIRFUNC, NULL, &ap->glob) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user