From fb0be397d0db2143d1ceb6b7e0916c20ac8e4535 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 23 Oct 2017 18:49:17 +0200 Subject: [PATCH] Fix mismatching alloc --- ext/fileinfo/libmagic/apprentice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index 4c30233b17a..5ee62d828b4 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/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; }