Add a FIXME for magic file order reading.
authorReuben Thomas <rrt@sc3d.org>
Thu, 30 Oct 2008 10:54:06 +0000 (10:54 +0000)
committerReuben Thomas <rrt@sc3d.org>
Thu, 30 Oct 2008 10:54:06 +0000 (10:54 +0000)
ChangeLog
src/apprentice.c

index 310bad56e2b2f4adc5bec50dd330f0d516d7826a..20ce0f2c3a9c80fc4b9fbd2f5920b5e18a3e3ffe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2008-10-18 11:00  Reuben Thomas <rrt@sc3d.org>
+2008-10-30 11:00  Reuben Thomas <rrt@sc3d.org>
 
        * Correct words counts in comments of struct magic.
 
@@ -12,6 +12,9 @@
        * Fix potential attacks via conversion specifications in magic
          strings.
 
+       * Add a FIXME for Debian bug #488562 (magic files should be
+         read in a defined order, by sorting the names).
+
 2008-10-18 16:45  Christos Zoulas <christos@astron.com>
 
        * Added APPLE file creator/type
index 3130c068aed413a257972003e172adcdf78c4797..22d65062fac51fb2dcf5be6de2bf6453c17361c1 100644 (file)
@@ -49,7 +49,7 @@
 #include <dirent.h>
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.141 2008/08/31 07:58:00 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.142 2008/10/18 20:47:48 christos Exp $")
 #endif /* lint */
 
 #define        EATAB {while (isascii((unsigned char) *l) && \
@@ -706,6 +706,8 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
                (void)fprintf(stderr, "%s\n", usg_hdr);
 
        /* load directory or file */
+        /* FIXME: Read file names and sort them to prevent
+           non-determinism. See Debian bug #488562. */
        if (stat(fn, &st) == 0 && S_ISDIR(st.st_mode)) {
                dir = opendir(fn);
                if (dir) {