diff options
author | will <will@FreeBSD.org> | 2000-11-30 13:56:19 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2000-11-30 13:56:19 +0000 |
commit | 4e7062f7a76f231ee5e81e160fac28829caa7f6a (patch) | |
tree | c3355f0f44b765a51b60d042f361f787b2298e1f /usr.bin/make/main.c | |
parent | 56b0ddae6c97b0d229fa62bc685d8379452c108b (diff) | |
download | FreeBSD-src-4e7062f7a76f231ee5e81e160fac28829caa7f6a.zip FreeBSD-src-4e7062f7a76f231ee5e81e160fac28829caa7f6a.tar.gz |
Format string paranoia. This should avoid potential buffer overflows from
user input (in its ever-broadening definition).
Obtained from: NetBSD
Diffstat (limited to 'usr.bin/make/main.c')
-rw-r--r-- | usr.bin/make/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 33719e8..97f4a85 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -928,7 +928,7 @@ ReadMakefile(p, q) } else { /* if we've chdir'd, rebuild the path name */ if (curdir != objdir && *fname != '/') { - (void)sprintf(path, "%s/%s", curdir, fname); + (void)snprintf(path, MAXPATHLEN, "%s/%s", curdir, fname); if ((stream = fopen(path, "r")) != NULL) { fname = path; goto found; |