Skip to content

Commit

Permalink
Fix buf in suffix protocol
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Sustrik <[email protected]>
  • Loading branch information
sustrik committed Nov 30, 2018
1 parent c1cf349 commit 302cdf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suffix.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static ssize_t dill_suffix_mrecvl(struct dill_msock_vfs *mvfs,
it = *it.iol_next;
}
/* Move one character to the user's iolist. */
if(it.iol_base) {
if(it.iol_base && it.iol_len > 0) {
((uint8_t*)it.iol_base)[0] = self->buf[0];
it.iol_base = ((uint8_t*)it.iol_base) + 1;
it.iol_len--;
Expand Down

0 comments on commit 302cdf6

Please sign in to comment.