Skip to content

Commit

Permalink
fuzz: Submit response if nghttp3_conn is server
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Jan 29, 2025
1 parent 39f6998 commit 288aba6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fuzz/fuzz_http3serverreq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extern "C" {

#include "nghttp3_macro.h"
#include "nghttp3_stream.h"
#include "nghttp3_conn.h"

#ifdef __cplusplus
}
Expand Down Expand Up @@ -141,8 +142,12 @@ int end_stream(nghttp3_conn *conn, int64_t stream_id, void *conn_user_data,
},
};

return nghttp3_conn_submit_response(conn, stream_id, nva,
nghttp3_arraylen(nva), nullptr);
if (conn->server) {
return nghttp3_conn_submit_response(conn, stream_id, nva,
nghttp3_arraylen(nva), nullptr);
}

return 0;
}
}; // namespace

Expand Down

0 comments on commit 288aba6

Please sign in to comment.