AnsweredAssumed Answered

MFS_Create_directory_entry Edge Case bug

Question asked by Leif Zars on Dec 22, 2016
Latest reply on Sep 22, 2017 by Craig Honegger

With out the following patch the call MFS_Extend_chain returning null is not handled, and if null (due to corrupted FAT) will causes hard faults.

 

diff --git a/mfs/Sources/generic/mfs_dir_entry.c b/mfs/Sources/generic/mfs_dir_entry.c
index fed539f..e715003 100644
--- a/mfs/Sources/generic/mfs_dir_entry.c
+++ b/mfs/Sources/generic/mfs_dir_entry.c
@@ -348,6 +348,8 @@
{
return (NULL);
}
+ }else{
+ return NULL;
}
}
}

Outcomes