From e62aa7d725d1ee0ee4113a5c9222e49d3fdab4d7 Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Wed, 23 Oct 2019 21:45:55 +0100 Subject: [PATCH] Bug fix - ensure allocation of %m format --- libdicl/configure.ac | 2 +- libdicl/gl/vasnprintf.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libdicl/configure.ac b/libdicl/configure.ac index b2aa306..bb502d1 100644 --- a/libdicl/configure.ac +++ b/libdicl/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.65) AC_INIT([libdicl], - [0.1.8], + [0.1.9], [daniel.hams@gmail.com]) AC_SUBST(ACLOCAL_AMFLAGS, "-I macros") diff --git a/libdicl/gl/vasnprintf.c b/libdicl/gl/vasnprintf.c index e35e49e..fc5ece0 100644 --- a/libdicl/gl/vasnprintf.c +++ b/libdicl/gl/vasnprintf.c @@ -2929,6 +2929,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, { const char * ens = strerror(errno); size_t ens_length = strlen(ens); + ENSURE_ALLOCATION (xsum (length, ens_length)); memcpy( result + length, ens, ens_length ); length += ens_length; }