OpenSSH -current fails regression on Solaris 8, sshd dumps core

Frank Cusack fcusack at fcusack.com
Mon Sep 23 06:32:50 EST 2002


On Sat, Sep 21, 2002 at 01:20:19PM -0500, Sam Reynolds wrote:
> Hi,  I believe the behavior of passing NULL to %s is undefined.

dunno about that either way

> NULL can be (but isn't necessarily) a macro expanding to
> (void*)0

No, it isn't.  NULL is guaranteed to be a macro expanding to an
"unadorned 0".

> and since sprintf is a variadic function, one would
> need an explicit cast to the appropriate type.

No, one doesn't.  A variadic function interprets pointers based on the
format string, not based on the type given to the compiler.

/fc



More information about the openssh-unix-dev mailing list