]> granicus.if.org Git - php/commitdiff
we don't do fstat, hence st struct is uninitalized
authorAntony Dovgal <tony2001@php.net>
Thu, 24 Jul 2008 14:53:59 +0000 (14:53 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 24 Jul 2008 14:53:59 +0000 (14:53 +0000)
ext/fileinfo/libmagic/apprentice.c

index e79d8b9468c9bc7df6b2170c744d8d0cb13d83c7..7939102ef04063c08a83c405cce7999576294225 100644 (file)
@@ -1976,9 +1976,11 @@ internal_loaded:
                    VERSIONNO, dbname, version);
                goto error1;
        }
-       *nmagicp = (uint32_t)(st.st_size / sizeof(struct magic));
+#ifndef PHP_BUNDLE
+       *nmagicp = (st.st_size / sizeof(struct magic));
        if (*nmagicp > 0)
                (*nmagicp)--;
+#endif
        (*magicp)++;
        if (needsbyteswap)
                byteswap(*magicp, *nmagicp);