> http://cr.opensolaris.org/~sowmini/arcfixes/
mac.c:
940 cp = (char *)tmp->b_wptr;
941 *cp++ = '\0';
942 tmp->b_wptr = (uchar_t *)cp;
Or just:
*tmp->b_wptr++ = '\0';
So, for my education, what's the background on non nul-terminated
strings in so much of networking code (and the need for precautions like
strn*)? I understand when a property value is untyped, i.e. just an
array of bytes. But stuff like names (link names, property names, etc)
are strings by definition, it should be easy to guarantee their
nul-terminatedness. Is this historical?
-Artem