Steffen Nurpmeso wrote: > Paul Vixie <[email protected]> wrote: > |... > > I think the former and latter of the above have the problem that > they return useless information: the size that would be necessary > to store the result in a non-truncated form. If that information > would be collected regulary using the above functions i would > think that this is really wasteful software that gives a s..t on > the necessity of, e.g., atomic plants etc. I think it is this > kind of mental direction that brings us all down. > > ...
i can't tell whether you're arguing for truncation. if so, i'm the downer your parents warned you about. truncation is by definition undefined, and a program should not continue once its state is undefined. we could meet somewhere near the middle by replacing strcpy with a macro that called strlcpy, looked at the returned result, and either overwrites the target buffer with a '\0' or calls abort, depending on the setting of an environment variable. -- P Vixie _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
