curl / Mailing Lists / curl-library / Single Mail


Null pointer dereference in tool_write_cb?

From: Jakub Wilk <>
Date: Sat, 17 Jun 2017 23:40:56 +0200

Since 5385450afd61, the tool_write_cb() function contains the following code
(with boring parts snipped):

  bool isatty = config->global->isatty;
  /* ... */
    return failure;

Something if off here: either config can be NULL, and then the first line would
deference such pointer; or config can never be NULL, and the null pointer check
is superfluous.

This was noticed by Hacker News user "Someone":

Jakub Wilk
Received on 2017-06-17