Re: Does struct qstr->name should be terminated ?
From: Bryan Henderson <hidden>
Date: 2004-03-24 17:10:09
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?