Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

add assertion after malloc function, fix issue 465 #466

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4040,7 +4040,8 @@ create_large_chunked_message (int body_size_in_kb, const char* headers)
size_t headers_len = strlen(headers);
size_t bufsize = headers_len + (5+1024+2)*body_size_in_kb + 6;
char * buf = malloc(bufsize);

assert(buf);

memcpy(buf, headers, headers_len);
wrote += headers_len;

Expand Down