On 2016-11-21 18:24:15 -0800, Claus Assmann wrote: > On Mon, Nov 21, 2016, Brendan Cully wrote: > > changeset: 6873:65f180f2904f > > > X509_NAME_oneline() always NULL-terminates the string, even when it > > Isn't the common terminology: > NULL: NULL pointer > NUL: '\0' > ?
NULL is the name of a C macro representing a null-pointer constant (which is not necessarily a pointer; it can be the integer 0, for instance; so "NULL pointer" is incorrect). NUL means the ASCII or EBCDIC character \0 (the special characters in US-ASCII and EBCDIC typically have names with at most 3 letters, hence this abbreviation). In all the other cases, it should be "null" (lowercase). In C, the byte 0 is called the "null character". NUL is definitely wrong in this context, as C may be based on a character set other than ASCII or EBCDIC, while the null character is charset independent. > > + /* Note that X509_NAME_online will NULL-terminate buf, even when it > ^e ^ > -> > > > + /* Note that X509_NAME_oneline will NUL-terminate buf, even when it Should be: /* Note that X509_NAME_oneline will null-terminate buf, even when it -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
