NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/47911: suspect APPLEUFS-related code in newfs
>Number: 47911
>Category: bin
>Synopsis: suspect APPLEUFS-related code in newfs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 09 22:30:00 +0000 2013
>Originator: David A. Holland
>Release: current of 20130608
>Organization:
>Environment:
n/a
>Description:
The DIRBLKSIZ logic in makedir() in newfs/mkfs.c seems wrong; see
below.
>How-To-Repeat:
code reading
>Fix:
Someone who knows more about APPLEUFS than the name please eyeball
this in case I'm missing something:
Index: sbin/newfs/mkfs.c
===================================================================
RCS file: /cvsroot/src/sbin/newfs/mkfs.c,v
retrieving revision 1.115
diff -U 5 -p -r1.115 mkfs.c
--- sbin/newfs/mkfs.c 9 Jun 2013 18:29:41 -0000 1.115
+++ sbin/newfs/mkfs.c 9 Jun 2013 22:23:11 -0000
@@ -1255,11 +1255,11 @@ makedir(struct direct *protodir, int ent
int i, spcleft;
int dirblksiz = UFS_DIRBLKSIZ;
if (isappleufs)
dirblksiz = APPLEUFS_DIRBLKSIZ;
- memset(buf, 0, UFS_DIRBLKSIZ);
+ memset(buf, 0, dirblksiz);
spcleft = dirblksiz;
for (cp = buf, i = 0; i < entries - 1; i++) {
protodir[i].d_reclen = UFS_DIRSIZ(Oflag == 0, &protodir[i], 0);
copy_dir(&protodir[i], (struct direct*)cp);
cp += protodir[i].d_reclen;
Home |
Main Index |
Thread Index |
Old Index