Thread (5 messages) 5 messages, 4 authors, 2004-03-25

Re: Does struct qstr->name should be terminated ?

From: Bryan Henderson <hidden>
Date: 2004-03-24 17:10:09

quoted
I'd think that it's treated as a nomral string in quite a few places, 
so
quoted
it needs to be NUL terminated. (But not searched the sources.)
Why not?  It isn't hard to find.

fs/dcache.c:703:        str[name->len] = 0;
That's technically an area where it's treated like a normal string, but 
not really relevant to the question (which is "what if I don't 
nul-terminate the thing"?  Do you have an example handy of a strcmp() or 
such that would fail if the NUL terminator were not there?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help