summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-10-23 18:49:17 +0200
committerAnatol Belski <ab@php.net>2017-10-23 18:49:17 +0200
commitfb0be397d0db2143d1ceb6b7e0916c20ac8e4535 (patch)
tree5e6d48802918e47a61033a1a5c0bb0f10ee3edf9 /ext/fileinfo/libmagic
parent12e2fc4ab6034cce3fc63e2000cbeb6cf0deed13 (diff)
downloadphp-git-fb0be397d0db2143d1ceb6b7e0916c20ac8e4535.tar.gz
Fix mismatching alloc
Diffstat (limited to 'ext/fileinfo/libmagic')
-rw-r--r--ext/fileinfo/libmagic/apprentice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c
index 4c30233b17..5ee62d828b 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;
}