aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_filedesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c
index dea5a43..72f9c06 100644
--- a/sys/kern/kern_filedesc.c
+++ b/sys/kern/kern_filedesc.c
@@ -54,7 +54,7 @@ make_write_buf(struct proc *td, const void *data, char **buf_out, size_t count)
const size_t MAX_COUNT = 0x7FFFF000;
char *buf = NULL;
- if (count > MAX_COUNT) {
+ if (count > MAX_COUNT || count == 0) {
return -EINVAL;
}