/* winduni.c -- unicode support for the windres program.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
}
/* Make sure we have zero terminated string. */
- p = tmp = (char *) alloca (a_length + 1);
+ p = tmp = (char *) xmalloc (a_length + 1);
memcpy (tmp, ascii, a_length);
tmp[a_length] = 0;
if (length)
*length = idx;
+
+ free (tmp);
}
/* Convert an unicode string to an ASCII string. We just copy it,