[En-Nut-Discussion] Mistake in phatdir.c

Krzysztof Sawicki krzysztof.sawicki at mobile.put.edu.pl
Mon Sep 2 12:29:41 CEST 2013


Hi!

We've found a bug in phatdir.c, probably someone changed loop range 
(line 226) and forgot to change this below.

Index: nut/fs/phatdir.c
===================================================================
--- nut/fs/phatdir.c	(revision 5273)
+++ nut/fs/phatdir.c	(working copy)
@@ -241,7 +241,7 @@
                  if ((got = PhatFileRead(ndp, entry, 
sizeof(PHATDIRENT))) != sizeof(PHATDIRENT)) {
                      if (got) {
                          /* Read error, stop searching. */
-                        i = 9;
+                        i = 99;
                      }
                      else {
                          /* End of directory reached, entry is unique. 
*/

-- 
Krzysztof Sawicki
Mobile Systems Research Labs, Poznan University of Technology


More information about the En-Nut-Discussion mailing list