summaryrefslogtreecommitdiff
path: root/term
diff options
context:
space:
mode:
Diffstat (limited to 'term')
-rw-r--r--term/users.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/term/users.c b/term/users.c
index 9d745c6d..eacd150a 100644
--- a/term/users.c
+++ b/term/users.c
@@ -1808,6 +1808,8 @@ trivfs_S_file_set_size (struct trivfs_protid *cred,
{
if (!cred)
return EOPNOTSUPP;
+ else if (size < 0)
+ return EINVAL;
pthread_mutex_lock (&global_lock);
if ((cred->po->openmodes & O_WRITE) == 0)
{