diff options
author | Shengzhe Zhao <a18689@motorola.com> | 2009-08-08 00:53:06 +0800 |
---|---|---|
committer | San Mehat <san@google.com> | 2009-08-07 08:12:50 -0700 |
commit | ea128a499ca81c7ca92751b7a4e8f6405c4b6322 (patch) | |
tree | f3ca2b19c7fe9791bca879313ad7f64787b337d1 | |
parent | 6702a4436d04b4fbe1be2f11ce5c1cd9ce64574c (diff) | |
download | android_external_fsck_msdos-ea128a499ca81c7ca92751b7a4e8f6405c4b6322.tar.gz android_external_fsck_msdos-ea128a499ca81c7ca92751b7a4e8f6405c4b6322.tar.bz2 android_external_fsck_msdos-ea128a499ca81c7ca92751b7a4e8f6405c4b6322.zip |
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>
-rw-r--r-- | dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -935,6 +935,7 @@ reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head) 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 |