From e57d2b2724b44594ea5ef82a80a6f303cb404598 Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Thu, 12 Mar 2020 09:22:29 -0400 Subject: [PATCH] Fix uninitialized variable use in http_client Thanks, Travis! --- test/http_client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/http_client.c b/test/http_client.c index bfc10c8..b76b139 100644 --- a/test/http_client.c +++ b/test/http_client.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -1034,6 +1035,9 @@ hset_prepare_decode (void *hset_p, struct lsxpack_header *xhdr, el->nalloc = 0; xhdr = &el->xhdr; } + else + el = (struct hset_elem *) ((char *) xhdr + - offsetof(struct hset_elem, xhdr)); if (min_space > el->nalloc) {