diff options
-rw-r--r-- | usr.sbin/afs/src/lib/bufdir/fdir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/afs/src/lib/bufdir/fdir.c b/usr.sbin/afs/src/lib/bufdir/fdir.c index 74f4634d6b1..240d337195e 100644 --- a/usr.sbin/afs/src/lib/bufdir/fdir.c +++ b/usr.sbin/afs/src/lib/bufdir/fdir.c @@ -287,7 +287,8 @@ add_to_page (DirPage0 *page0, page->entry[i].next = next; page->entry[i].fid.Vnode = htonl(fid.Vnode); page->entry[i].fid.Unique = htonl(fid.Unique); - strlcpy (page->entry[i].name, filename, sizeof(page->entry[i].name)); + /* XXX find a better bound. very unusual buffer handling */ + strlcpy (page->entry[i].name, filename, strlen(filename) + 1); memset(page->entry[i + j - 1].fill, 0, 4); if (pageno < MAXPAGES) page0->dheader.map[pageno] -= n; |