mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-09 12:58:07 +00:00
MINOR: quic: fix segfault on CONNECTION_CLOSE parsing
At the moment the reason_phrase member of a quic_connection_close/quic_connection_close_app structure is not allocated. Comment the memcpy to it to avoid segfault.
This commit is contained in:
parent
b154422db1
commit
942fc79b5f
@ -821,7 +821,8 @@ static int quic_build_connection_close_app_frame(unsigned char **buf, const unsi
|
||||
return 0;
|
||||
|
||||
if (connection_close_app->reason_phrase_len) {
|
||||
memcpy(*buf, connection_close_app->reason_phrase, connection_close_app->reason_phrase_len);
|
||||
// TODO reason_phrase is not allocated
|
||||
//memcpy(*buf, connection_close_app->reason_phrase, connection_close_app->reason_phrase_len);
|
||||
*buf += connection_close_app->reason_phrase_len;
|
||||
}
|
||||
|
||||
@ -843,7 +844,8 @@ static int quic_parse_connection_close_app_frame(struct quic_frame *frm, struct
|
||||
end - *buf < connection_close_app->reason_phrase_len)
|
||||
return 0;
|
||||
|
||||
memcpy(connection_close_app->reason_phrase, *buf, connection_close_app->reason_phrase_len);
|
||||
// TODO reason_phrase is not allocated
|
||||
//memcpy(connection_close_app->reason_phrase, *buf, connection_close_app->reason_phrase_len);
|
||||
*buf += connection_close_app->reason_phrase_len;
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user