Skip to content

Commit

Permalink
PR/579: Andre: Avoid possible infinite recursion in out of memory from
Browse files Browse the repository at this point in the history
*asprintf
  • Loading branch information
zoulasc committed Dec 1, 2016
1 parent 17f892b commit 204a29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "file.h"

#ifndef lint
FILE_RCSID("@(#)$File: funcs.c,v 1.89 2016/03/21 15:56:53 christos Exp $")
FILE_RCSID("@(#)$File: funcs.c,v 1.90 2016/10/19 20:51:17 christos Exp $")
#endif /* lint */

#include "magic.h"
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 204a29e

Please sign in to comment.