Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Wrong size returned by readdir for /proc: (2 Items)
   
Wrong size returned by readdir for /proc  
Hi,

In QNX650, while calling readdir() for root folder, for "proc" entry dirent::d_namelen comes with value of 6, while 
normally it would have to be 5 (the length + zero terminator).
While being easy to work around, it's still unpleasant to have to be doing strlen() for every directory entry and re-
validating everything because of this bug.
Re: Wrong size returned by readdir for /proc  
> Hi,
> 
> In QNX650, while calling readdir() for root folder, for "proc" entry dirent::
> d_namelen comes with value of 6, while normally it would have to be 5 (the 
> length + zero terminator).
> While being easy to work around, it's still unpleasant to have to be doing 
> strlen() for every directory entry and re-validating everything because of 
> this bug.

Well, a little correction:
d_namelen comes with value of 5, while normally it would have to be 4