m) fix: quic server may assert failed when invalid SETTINGS frame in (#317)

ref: issue #316
This commit is contained in:
wangfuyu 2021-09-15 23:47:16 +08:00 committed by GitHub
parent ff412f2f22
commit 5684638017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ lsquic_frame_reader_new (enum frame_reader_flags flags,
#endif
const struct lsquic_hset_if *hsi_if, void *hsi_ctx)
{
struct lsquic_frame_reader *fr = malloc(sizeof(*fr));
struct lsquic_frame_reader *fr = calloc(1, sizeof(*fr));
if (!fr)
return NULL;
fr->fr_mm = mm;

View File

@ -106,7 +106,7 @@ lsquic_frame_writer_new (struct lsquic_mm *mm, struct lsquic_stream *stream,
return NULL;
}
fw = malloc(sizeof(*fw));
fw = calloc(1, sizeof(*fw));
if (!fw)
return NULL;