Browse Source

Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)
pull/630/head
Remi Collet 12 years ago
parent
commit
62305edc5b
  1. 14
      ext/fileinfo/libmagic/apprentice.c

14
ext/fileinfo/libmagic/apprentice.c

@ -499,12 +499,14 @@ apprentice_unmap(struct magic_map *map)
if (map == NULL)
return;
if (map->p != php_magic_database) {
int j;
for (j = 0; j < MAGIC_SETS; j++) {
if (map->magic[j])
efree(map->magic[j]);
}
if (map->p != NULL) {
if (map->p == NULL) {
int j;
for (j = 0; j < MAGIC_SETS; j++) {
if (map->magic[j]) {
efree(map->magic[j]);
}
}
} else {
efree(map->p);
}
}

Loading…
Cancel
Save