misc: array bounds fixes that gcc finds (John Gosset)

This commit is contained in:
Russ Cox 2008-05-10 13:35:19 -04:00
parent 77809fb0cc
commit ada24b4005
6 changed files with 6 additions and 9 deletions

View file

@ -84,7 +84,7 @@ popdir(Ram *r)
continue;
f = iget(ino);
strncpy(name, dp->name, VNAMELEN);
name[VNAMELEN+1] = '\0';
name[VNAMELEN] = '\0';
f.name = name;
popfile(r, f);
}