Re: NULL pointer dereference in skalibs's mininetstring_write()

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Fri, 13 Mar 2015 16:34:41 +0100

On 13/03/2015 15:50, Roman Khimov wrote:
> 11 if (!w)

  That one should be: if (!*w)


> It's obvious that if 'w' is NULL there will be NULL pointer dereference on
> line 19 or 20. What's not so obvious is how to properly fix that.

  Actually, w is never supposed to be NULL. Calling mininetstring_write()
with a NULL w is a programming error, and testing w instead of *w was
a bug.

  Thanks for the report!

-- 
  Laurent
Received on Fri Mar 13 2015 - 15:34:41 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC