Hello Russell.

Please, please use the real address of the list, it is
s-mailx at lists dot sdaoden dot eu.
Just in case others do not use regular or other fault-tolerant
matching expressions.
It does not matter at the moment, but it may point to different
addresses / use specific certificates / whatever in the future.
Thank you.

[email protected] wrote in <[email protected]>:
 |
 | I don't understand Mr Nurpmeso's reply.
 | I discovered that s-mailx thinks that From lines with
 |single-digit day-of-month don't conform to rfc4155.  (I tested
 |hundreds of messages.)  rfc4155 cites ctime as the authority for the
 |format of date & time.  ctime's man page says that it returns unpadded
 |numbers for day-of-month.  Thus I think s-mailx makes a mistake.

ctime() uses asctime() and asctime() is defined by the standard
and does perform space padding.
Moreover it is defined to place the result in a buffer of exactly
26 characters, which may become overflown and thus cause crashes,
which is why we had to implement our own (auxlily.c,
n_time_ctime()) with the following comment:

 /* problem is that secsepoch may be invalid for representation of ctime(3),
  * which indeed is asctime(localtime(t)); musl libc says for asctime(3):
  *    iso c requires us to use the above format string,
  *    even if it will not fit in the buffer. thus asctime_r
  *    is _supposed_ to crash if the fields in tm are too large.
  *    we follow this behavior and crash "gracefully" to warn
  *    application developers that they may not be so lucky
  *    on other implementations (e.g. stack smashing..).
  * so we need to do it on our own or the libc may kill us */

And i am in total opposition to segmentation violations!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to