[SSSD] [PATCH] Assorted fixes found by the clang static analyzer

Stephen Gallagher sgallagh at redhat.com
Thu May 3 15:46:36 UTC 2012


On Thu, 2012-05-03 at 10:22 +0200, Jakub Hrozek wrote:
> > 
> > Please terminate after the lookup instead. The fread() doesn't guarantee
> > termination either, so if it reads the full MAX_PID_LENGTH, we could
> > overrun reading from it (it would still overwrite the last NULL, even if
> > you're right about the initialization, which I don't think you are but
> > I'm too tired to verify right now).
> 
> OK, that's better. Fixed.
> 
> I am right, though :-), see
> http://stackoverflow.com/questions/629017/how-does-array100-0-set-the-entire-array-to-0
> which even links to the C standard document.
> 

Ack, and thanks for the pointer. It's always good to be reminded that I
don't know everything :)

Pushed all four to master.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120503/1023b20e/attachment.sig>


More information about the sssd-devel mailing list