summaryrefslogtreecommitdiff
path: root/fs/ksmbd/ndr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ksmbd/ndr.c')
-rw-r--r--fs/ksmbd/ndr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ksmbd/ndr.c b/fs/ksmbd/ndr.c
index 8317f7ca402b..5052be9261d9 100644
--- a/fs/ksmbd/ndr.c
+++ b/fs/ksmbd/ndr.c
@@ -148,7 +148,7 @@ static int ndr_read_int16(struct ndr *n, __u16 *value)
static int ndr_read_int32(struct ndr *n, __u32 *value)
{
if (n->offset + sizeof(__u32) > n->length)
- return 0;
+ return -EINVAL;
if (value)
*value = le32_to_cpu(*(__le32 *)ndr_get_field(n));