aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2011-03-06 22:59:30 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2011-03-06 22:59:30 +0000
commit0ad4dd9a00f1def40fe57db36c8c28b71aa7d1ad (patch)
tree6ff814fe951bc8b87baf732d6e6e924b619fc79a
parent1fee97b01fbbd912fc03db57f8a20c3d6c3fc88d (diff)
Notes
-rw-r--r--sys/kern/imgact_shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c
index 0dc9299f5434..d9884f5d1cdf 100644
--- a/sys/kern/imgact_shell.c
+++ b/sys/kern/imgact_shell.c
@@ -195,7 +195,7 @@ exec_shell_imgact(imgp)
length = (imgp->args->argc == 0) ? 0 :
strlen(imgp->args->begin_argv) + 1; /* bytes to delete */
- if (offset - length > imgp->args->stringspace) {
+ if (offset > imgp->args->stringspace + length) {
if (sname != NULL)
sbuf_delete(sname);
return (E2BIG);