mirror of
https://github.com/nginx/nginx.git
synced 2024-12-04 22:09:01 +08:00
HTTP/3: prevent array access by negative index for unknown streams.
Currently there are no such streams, but the function ngx_http_v3_get_uni_stream() supports them.
This commit is contained in:
parent
e0eb261b83
commit
1c54340e0a
@ -320,7 +320,9 @@ ngx_http_v3_get_uni_stream(ngx_connection_t *c, ngx_uint_t type)
|
||||
sc->read->handler = ngx_http_v3_uni_read_handler;
|
||||
sc->write->handler = ngx_http_v3_dummy_write_handler;
|
||||
|
||||
h3c->known_streams[index] = sc;
|
||||
if (index >= 0) {
|
||||
h3c->known_streams[index] = sc;
|
||||
}
|
||||
|
||||
n = (u_char *) ngx_http_v3_encode_varlen_int(buf, type) - buf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user