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;
 }
 }
 }
 
					
				
		
 danielchen
		
			danielchen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI Leif:
Thank you for your feedback. Could you let us know your MQX version, and which patch?
Regards
Daniel
Version: 4.2.0.2
 
					
				
		
 danielchen
		
			danielchen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Leif Zars
I do not find any difference in mfs_dir_entry.c between MQX 4.2.0 and patch MQX 4.2.0.2. Are you comparing the two versions? I compared MQX 4.1 and 4.2, they are different, but sees not your mentioned. How can I reproduce your issue in my side. Thanks
Regards
Daniel
Adding the highlighted section of code fixes the issue, otherwise an error returned from MFS_Extend_chain will cause a crash .
 
					
				
		
 danielchen
		
			danielchen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks , I will discuss this issue with the developers and hope they can merge this fix in mqx v5 version.
Regards
Daniel
Good deal, thanks
 
					
				
		
This has been fixed in MQX v5 and will be available in the next release.
Thanks for reporting the issue.
