diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mds-server/client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mds-server/client.c b/src/mds-server/client.c index e99a92e..f927cb1 100644 --- a/src/mds-server/client.c +++ b/src/mds-server/client.c @@ -216,8 +216,9 @@ size_t client_unmarshal(client_t* restrict this, char* restrict data) buf_get_next(data, int, this->open); buf_get_next(data, uint64_t, this->id); buf_get_next(data, size_t, n); - if (mds_message_unmarshal(&(this->message), data)) - return 0; + if (n > 0) + if (mds_message_unmarshal(&(this->message), data)) + return 0; data += n / sizeof(char); rc += n; buf_get_next(data, size_t, this->interception_conditions_count); |