You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/26 04:33:30 UTC

[GitHub] [incubator-nuttx] Donny9 removed a comment on pull request #2739: fs/readdir: Must reserve a byte for the NUL terminator

Donny9 removed a comment on pull request #2739:
URL: https://github.com/apache/incubator-nuttx/pull/2739#issuecomment-767279936


   > ?
   Okay, the size of d_name is NAME_MAX + 1, and the maximum length of directory name is NAME_MAX, and the last bytes should be NULL character. And strncpy will not append '\0' when source is bigger than num, so we need reserve a byte for the NUL terminator, otherwise NAME_MAX doesn't mean anything.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org