Skip to content

Commit

Permalink
Fix global-buffer-overflow in client_test
Browse files Browse the repository at this point in the history
The length of "*1\r\n,3.14159265358979323846\r\n" is 29.

Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Sep 10, 2024
1 parent d03a53f commit 4d4b86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/client_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ static void test_reply_reader(void) {

test("Can parse RESP3 doubles in an array: ");
reader = valkeyReaderCreate();
valkeyReaderFeed(reader, "*1\r\n,3.14159265358979323846\r\n", 31);
valkeyReaderFeed(reader, "*1\r\n,3.14159265358979323846\r\n", 29);
ret = valkeyReaderGetReply(reader, &reply);
test_cond(ret == VALKEY_OK &&
((valkeyReply *)reply)->type == VALKEY_REPLY_ARRAY &&
Expand Down

0 comments on commit 4d4b86e

Please sign in to comment.