marksalpeter / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
0 stars 1 forks source link

mkyaffs2 always crashes #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I traced the issue back to closedir() being called with the 'path' variable
rather than the 'dir' variable, as returned from opendir().

Applying the following patch fixes the issue:
Index: mkyaffs2.c
===================================================================
--- mkyaffs2.c  (revision 10)
+++ mkyaffs2.c  (working copy)
@@ -584,12 +584,12 @@
 error:
                if (retval) {
                        fprintf(stderr, "error while parsing %s\n", fpath);
-                       closedir(path);
+                       closedir(dir);
                        return -1;
                }
        }

-       closedir(path);
+       closedir(dir);

        return 0;
 }

Original issue reported on code.google.com by HIGH...@gmail.com on 14 Dec 2010 at 12:13

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 22 Dec 2010 at 2:49

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 28 Dec 2010 at 7:41