Re: [PATCH] Avoiding Dereferencing of NULL pointer

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hi,

On Sun, Oct 06, 2019 at 08:38:23PM +0200, Alex Bligh wrote:
> The initialization to NULL sounds bogus but technically gmtime can return
> NULL at least on some systems. From the manpage on OS-X (closest I had
> to hand):

While the return value can be NULL (so the *check* for NULL is a bit
obscure but theoretically "it could happen"), the *initialization* is
just bogus - this is not a pass-by-reference pointer that could be set
or not, but a function return value, which is always set (possibly
to NULL), and always overwrites whatever you init it with.

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             gert@xxxxxxxxxxxxxx
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux