* src/warc.c (warc_write_end_record): Check warc_write_ok (fix use-after-free)"

This commit is contained in:
Tim Rühsen 2024-05-05 17:59:20 +02:00
parent 0490e301d4
commit bb0aa299e9

View File

@ -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;