bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [PATCH 03/25] Bugfix: Fix NULL filename and output_stream in


From: Matthew White
Subject: [Bug-wget] [PATCH 03/25] Bugfix: Fix NULL filename and output_stream in Metalink module
Date: Sat, 10 Sep 2016 12:47:53 +0200

[Coverity Scan is ok, make syntax-check is ok, make check-valgrind is ok, 
contrib/check-hard is ok]

This fixes some problems leading to a possible segmentation fault, and conforms 
to the RFC5854 standard.

The following description is verbatim from the patch:
-----
If unique_create() cannot create/open the destination file, filename
and output_stream remain NULL. If fopen() is used instead, filename
always remains NULL. Both functions cannot create "path/file" trees.

Setting filename to the right value is sufficient to prevent SIGSEGV
generating from testing a NULL value. This also allows retrieve_url()
to create a "path/file" tree through opt.output_document.

Reading NULL as output_stream, when it shall not be, leads to wrong
results. For instance, a non-NULL output_stream tells when a stream
was interrupted, reading NULL instead means to assume the contrary.
-----

Regards,
Matthew

-- 
Matthew White <address@hidden>

Attachment: 0003-Bugfix-Fix-NULL-filename-and-output_stream-in-Metali.patch
Description: Text Data

Attachment: pgpSZAz39zvld.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]