[stunnel-users] fix resource leaks and potential null

Brian Wilkins bwilkins at gmail.com
Tue Feb 5 18:57:47 CET 2013


No matter..this is the right way to check if a pointer is null in C.
http://stackoverflow.com/questions/7970617/how-can-i-check-if-char-variable-points-to-empty-string


On Tuesday, February 5, 2013, Arthur Mesh wrote:

> On Tue, Feb 05, 2013 at 05:25:59AM -0500, Brian Wilkins wrote:
> > Checking if errstr is null
> >
> > > On Mon, Feb 04, 2013 at 02:48:36PM -0500, Brian Wilkins wrote:
> > > > Looks like a false positive..checking if a char array is null in that
> > > > manner is a well known convention.
>
> Actually, I disagree. errstr is a pointer to a character, not a
> character array.
>
> If you take a closer look, you'll see that errstr is initialized
> conditionally. Whereas  its value is checked unconditionally. Now, if
> you're implying that there is no way it's never initialized before its
> value is checked, then fine. Otherwise, it seems like a bug.
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20130205/7086d943/attachment.html>


More information about the stunnel-users mailing list