projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not expand in degenerate cases
[unix-history]
/
usr
/
src
/
sbin
/
fsck
/
dir.c
diff --git
a/usr/src/sbin/fsck/dir.c
b/usr/src/sbin/fsck/dir.c
index
09fe295
..
02f4119
100644
(file)
--- a/
usr/src/sbin/fsck/dir.c
+++ b/
usr/src/sbin/fsck/dir.c
@@
-16,7
+16,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)dir.c 5.1
5
(Berkeley) %G%";
+static char sccsid[] = "@(#)dir.c 5.1
6
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-455,7
+455,7
@@
expanddir(dp, name)
char *cp, firstblk[DIRBLKSIZ];
lastbn = lblkno(&sblock, dp->di_size);
char *cp, firstblk[DIRBLKSIZ];
lastbn = lblkno(&sblock, dp->di_size);
- if (lastbn >= NDADDR - 1)
+ if (lastbn >= NDADDR - 1
|| dp->di_db[lastbn] == 0 || dp->di_size == 0
)
return (0);
if ((newblk = allocblk(sblock.fs_frag)) == 0)
return (0);
return (0);
if ((newblk = allocblk(sblock.fs_frag)) == 0)
return (0);