[stunnel-users] fix resource leaks and potential null

Brian Wilkins bwilkins at gmail.com
Tue Feb 5 19:52:12 CET 2013


You are completely correct in that regard, but checking if a pointer is
null is a different concept. It's not as if the program tried to see if it
actually contained a string.
On Feb 5, 2013 1:45 PM, "Arthur Mesh" <arthurmesh at gmail.com> wrote:

> On Tue, Feb 05, 2013 at 01:41:30PM -0500, Brian Wilkins wrote:
> > It's a variable that points to null.
>
> Only if you initialize it. It's not initialized during declaration, hence
> its
> value is "garbage" from stack. It's only initialized conditionally later
> on.
>
> > this is a valid check to see if the
> > pointer is null. Coverity is showing a false positive.
>
> I don't see any evidence showing that it's guaranteed to be initialized
> before you read its value in:
>
> 2113     if(errstr) {
> 2114         s_log(LOG_ERR, "Service [%s]: %s", section->servname,
> 2115               errstr);
> 2116         return 1;
> 2117     }
>
> In any case. if you're convinced it's a false positive, so be it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20130205/c20d6b8b/attachment.html>


More information about the stunnel-users mailing list