commit | 4d6d6f8a3674ad67f970e2ae908d34f64e4854cf | [log] [tgz] |
---|---|---|
author | Shengzhe Zhao <a18689@motorola.com> | Sat Aug 08 00:53:06 2009 +0800 |
committer | San Mehat <san@google.com> | Fri Aug 07 08:10:18 2009 -0700 |
tree | f3ca2b19c7fe9791bca879313ad7f64787b337d1 | |
parent | 6702a4436d04b4fbe1be2f11ce5c1cd9ce64574c [diff] |
fix the issue that variable lfcl in dir.c get enormous value. Signed-off-by: Shengzhe Zhao <a18689@motorola.com> Signed-off-by: San Mehat <san@google.com>
diff --git a/dir.c b/dir.c index b2f090e..5837463 100644 --- a/dir.c +++ b/dir.c
@@ -935,6 +935,7 @@ if (lfcl < CLUST_FIRST || lfcl >= boot->NumClusters) { /* Extend LOSTDIR? XXX */ pwarn("No space in %s\n", LOSTDIR); + lfcl = (lostDir->head < boot->NumClusters) ? lostDir->head : 0; return FSERROR; } lfoff = lfcl * boot->ClusterSize