Skip to content

Fix null-pointer dereference on -r -np

Tsukasa OI requested to merge a4lg/wget2:fix--r--np into master

When -r and -np options are enabled, wget2 will crash while adding URL like http://example.com (domain alone without slashes). This commit resolves this problem by additional checking of iri->path. I also modified the test tests/test-np.c to detect this special case.

I consider this change is too small to be copyrighted but alert me if I need the FSF Copyright Assignment before this contribution.

Approver's checklist:

  • The author has submitted the FSF Copyright Assignment and is listed in AUTHORS
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent with existing code
  • This feature/change has adequate documentation added (if appropriate)
  • No obvious mistakes / misspelling in the code
Edited by Tsukasa OI

Merge request reports