mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
Fix zipmap test null pointer (#975)
The previous test does a strncmp on a NULL, which is not valid. It should be using an empty length string instead. Addresses https://github.com/valkey-io/valkey/actions/runs/10649272046/job/29519233939. Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This commit is contained in:
parent
08ffbae169
commit
bf0f2651cf
@ -91,7 +91,7 @@ int test_zipmapIterateThroughElements(int argc, char *argv[], int flags) {
|
|||||||
unsigned char *key, *value;
|
unsigned char *key, *value;
|
||||||
unsigned int klen, vlen;
|
unsigned int klen, vlen;
|
||||||
char *expected_key[] = {"name", "surname", "age", "hello", "foo", "noval"};
|
char *expected_key[] = {"name", "surname", "age", "hello", "foo", "noval"};
|
||||||
char *expected_value[] = {"foo", "foo", "foo", "world!", "12345", NULL};
|
char *expected_value[] = {"foo", "foo", "foo", "world!", "12345", ""};
|
||||||
unsigned int expected_klen[] = {4, 7, 3, 5, 3, 5};
|
unsigned int expected_klen[] = {4, 7, 3, 5, 3, 5};
|
||||||
unsigned int expected_vlen[] = {3, 3, 3, 6, 5, 0};
|
unsigned int expected_vlen[] = {3, 3, 3, 6, 5, 0};
|
||||||
int iter = 0;
|
int iter = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user