projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9594b4e
)
shlock(1) - Fix a possible overflow.
author
Gwenio <gwenio@live.com>
Sat, 9 Mar 2013 11:28:05 +0000 (12:28 +0100)
committer
Antonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 9 Mar 2013 11:28:05 +0000 (12:28 +0100)
usr.bin/shlock/shlock.c
patch
|
blob
|
blame
|
history
diff --git
a/usr.bin/shlock/shlock.c
b/usr.bin/shlock/shlock.c
index
ca7c292
..
9f33f56
100644
(file)
--- a/
usr.bin/shlock/shlock.c
+++ b/
usr.bin/shlock/shlock.c
@@
-234,7
+234,7
@@
check_lock(const char *file, int uucpstyle, int debug)
return(1);
}
- buf[BUFSIZE] = '\0';
+ buf[BUFSIZE - 1] = '\0';
errno = 0;
tmp_pid = strtol(buf, &endptr, 10);
if ((*endptr != '\0' && *endptr != '\n') || errno ||