diff options
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/file-set-size.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libnetfs/file-set-size.c b/libnetfs/file-set-size.c index 72f31db7..b4a8cd23 100644 --- a/libnetfs/file-set-size.c +++ b/libnetfs/file-set-size.c @@ -29,6 +29,8 @@ netfs_S_file_set_size (struct protid *user, if (!user) return EOPNOTSUPP; + else if (size < 0) + return EINVAL; pthread_mutex_lock (&user->po->np->lock); err = netfs_attempt_set_size (user->user, user->po->np, size); |