aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2000-02-21 10:22:39 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2000-02-21 10:22:39 +0000
commit74db3cd1907f7a311231c5af67a9041a50433d24 (patch)
tree6583696921297464b23e1ad44b4759c519a51911 /usr.sbin
parent2c5a871a822ec3dd7bfafba23b9a8916a75ce8e6 (diff)
downloadsrc-74db3cd1907f7a311231c5af67a9041a50433d24.tar.gz
src-74db3cd1907f7a311231c5af67a9041a50433d24.zip
Fix a buffer overflow.
PR: 16415 Submitted by: Kevin Day <toasty@dragondata.com> Approved by: jkh
Notes
Notes: svn path=/head/; revision=57373
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/procctl/procctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/procctl/procctl.c b/usr.sbin/procctl/procctl.c
index fb4d5dfed522..574523f908b4 100644
--- a/usr.sbin/procctl/procctl.c
+++ b/usr.sbin/procctl/procctl.c
@@ -1,5 +1,5 @@
/*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -63,7 +63,7 @@ main(int ac, char **av) {
for (i = 1; i < ac; i++) {
char buf[32];
- sprintf(buf, "/proc/%s/mem", av[i]);
+ snprintf(buf, sizeof(buf), "/proc/%s/mem", av[i]);
fd = open(buf, O_RDWR);
if (fd == -1) {
if (errno == ENOENT)