Skip to content

Commit

Permalink
Fix uninitialized variable use in http_client
Browse files Browse the repository at this point in the history
Thanks, Travis!
  • Loading branch information
Dmitri Tikhonov committed Mar 12, 2020
1 parent a5fa05f commit e57d2b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit e57d2b2

Please sign in to comment.