diff options
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/open.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib9/open.c b/src/lib9/open.c index 65ea99ec..2354268b 100644 --- a/src/lib9/open.c +++ b/src/lib9/open.c @@ -318,8 +318,7 @@ dirreadmax(int fd, Dir **dp, int max) return -1; break; } - if(de->d_name[de->d_namlen] != 0) - sysfatal("bad readdir"); + // Note: not all systems have d_namlen. Assume NUL-terminated. if(de->d_name[0]=='.' && de->d_name[1]==0) continue; if(de->d_name[0]=='.' && de->d_name[1]=='.' && de->d_name[2]==0) |