diff options
-rw-r--r-- | fuzzing/nxt_http_h1p_peer_fuzz.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fuzzing/nxt_http_h1p_peer_fuzz.c b/fuzzing/nxt_http_h1p_peer_fuzz.c index 54876658..43786d0c 100644 --- a/fuzzing/nxt_http_h1p_peer_fuzz.c +++ b/fuzzing/nxt_http_h1p_peer_fuzz.c @@ -62,6 +62,16 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) goto failed; } + req->peer = nxt_mp_zalloc(mp, sizeof(nxt_http_peer_t)); + if (req->peer == NULL) { + goto failed; + } + + req->peer->proto.h1 = nxt_mp_zalloc(mp, sizeof(nxt_h1proto_t)); + if (req->peer->proto.h1 == NULL) { + goto failed; + } + buf.start = (u_char *)data; buf.end = (u_char *)data + size; buf.pos = buf.start; |