diff options
author | arr <arr@FreeBSD.org> | 2001-11-20 16:47:42 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2001-11-20 16:47:42 +0000 |
commit | d2f823593c6c3eae8866726d9c61f5899720287f (patch) | |
tree | 40b2696a1b6ba26c08b711b08737af275e1a024e /usr.bin/ar | |
parent | c0eac83160e108c5bb1862cabc25a909c66f9581 (diff) | |
download | FreeBSD-src-d2f823593c6c3eae8866726d9c61f5899720287f.zip FreeBSD-src-d2f823593c6c3eae8866726d9c61f5899720287f.tar.gz |
- When copying into a fixed buffer, bounds checking should occur.
PR: bin/31673
Diffstat (limited to 'usr.bin/ar')
-rw-r--r-- | usr.bin/ar/misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ar/misc.c b/usr.bin/ar/misc.c index d99d956..0a0dd1b 100644 --- a/usr.bin/ar/misc.c +++ b/usr.bin/ar/misc.c @@ -73,9 +73,10 @@ tmp() } if (envtmp) - (void)sprintf(path, "%s/%s", envtmp, _NAME_ARTMP); + (void)snprintf(path, sizeof(path), "%s/%s", envtmp, + _NAME_ARTMP); else - strcpy(path, _PATH_ARTMP); + strlcpy(path, _PATH_ARTMP, sizeof(path)); sigfillset(&set); (void)sigprocmask(SIG_BLOCK, &set, &oset); |