mirror of
https://github.com/mirror/wget.git
synced 2024-12-26 21:00:26 +08:00
* src/warc.c (warc_write_end_record): Check warc_write_ok (fix use-after-free)"
This commit is contained in:
parent
0490e301d4
commit
bb0aa299e9
@ -327,6 +327,9 @@ warc_write_block_from_file (FILE *data_in)
|
|||||||
static bool
|
static bool
|
||||||
warc_write_end_record (void)
|
warc_write_end_record (void)
|
||||||
{
|
{
|
||||||
|
if (!warc_write_ok)
|
||||||
|
return warc_write_ok;
|
||||||
|
|
||||||
if (warc_write_buffer ("\r\n\r\n", 4) != 4)
|
if (warc_write_buffer ("\r\n\r\n", 4) != 4)
|
||||||
{
|
{
|
||||||
warc_write_ok = false;
|
warc_write_ok = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user