From 158fb9ef5a4d925d4e2f9be349826e4a59df8ace Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Wed, 19 Jun 2019 23:15:17 +0200 Subject: [PATCH] Rather use last byte to determine what to do --- fuzzing/uSocketsMock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzing/uSocketsMock.c b/fuzzing/uSocketsMock.c index 0378c7d..b557646 100644 --- a/fuzzing/uSocketsMock.c +++ b/fuzzing/uSocketsMock.c @@ -151,8 +151,8 @@ int us_socket_write(int ssl, struct us_socket_t *s, const char *data, int length return 0; } - /* First byte determines if we send everything or not, to stress the buffering mechanism */ - if (data[0] % 2 == 0) { + /* Last byte determines if we send everything or not, to stress the buffering mechanism */ + if (data[length - 1] % 2 == 0) { /* Send only half, but first set our outgoing flag */ s->wants_writable = 1; return length / 2;