Re: [PATCH] drop some obsolete (char*) casts

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

 



On 30 Sep 2021 20:26, Thorsten Glaser wrote:
> On Thu, 30 Sep 2021, Mike Frysinger wrote:
> > -			execl(shell, shell, "-c", args, (char *)NULL);
> > +			execl(shell, shell, "-c", args, NULL);
> 
> This just introduced a bug on LP64 platforms on some OSes ;-)
> 
> tl;dr: there are OSes that #define NULL 0 (and dalias even
> defends doing so), and this is all the standards guarantee
> as well, so use of a nil pointer constant as sentinel must
> be explicitly cast, otherwise it’s just an int.
> 
> The style(9) manpage of various BSDs has a paragraph on that
> (regarding variadic functions).

thanks ... i'm aware of the nuance, but in my hurry i was thinking these
were execv style funcs, not variadic ones.  i'll respin.
-mike

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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