Browse Source

Fix mismatching alloc

pull/2876/head
Anatol Belski 9 years ago
parent
commit
fb0be397d0
  1. 2
      ext/fileinfo/libmagic/apprentice.c

2
ext/fileinfo/libmagic/apprentice.c

@ -2853,7 +2853,7 @@ apprentice_buf(struct magic_set *ms, struct magic *buf, size_t len)
{
struct magic_map *map;
if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
file_oomem(ms, sizeof(*map));
return NULL;
}

Loading…
Cancel
Save