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.
diff --git a/src/quic_frame.c b/src/quic_frame.c
index 7194e6f..dfb6103 100644
--- a/src/quic_frame.c
+++ b/src/quic_frame.c
@@ -821,7 +821,8 @@
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 @@
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;