summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2016-12-01 16:16:14 +0000
committerChristos Zoulas <christos@zoulas.com>2016-12-01 16:16:14 +0000
commitb6ed2afc6192df984b3a707478b949bd3af64098 (patch)
tree4e41b7146cf7439fb079f99668923ff48531dbc2
parent62427f95a941e2f59bc468831d0fd488cafdb77b (diff)
downloadfile-git-b6ed2afc6192df984b3a707478b949bd3af64098.tar.gz
PR/579: Andre: Avoid possible infinite recursion in out of memory from
*asprintf
-rw-r--r--src/funcs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/funcs.c b/src/funcs.c
index c8918a45..33b54f61 100644
--- a/src/funcs.c
+++ b/src/funcs.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.90 2016/10/19 20:51:17 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.91 2016/12/01 16:16:14 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -76,7 +76,7 @@ file_vprintf(struct magic_set *ms, const char *fmt, va_list ap)
ms->o.buf = buf;
return 0;
out:
- file_error(ms, errno, "vasprintf failed");
+ fprintf(stderr, "vasprintf failed (%s)", strerror(errno));
return -1;
}