summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xplist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xplist.c b/src/xplist.c
index 899cc81..f62178e 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -161,12 +161,14 @@ static void node_to_xml(node_t* node, void *xml_struct)
case PLIST_UINT:
tag = XPLIST_INT;
- (void)asprintf(&val, "%"PRIu64, node_data->intval);
+ val = (char*)malloc(64);
+ (void)snprintf(val, 64, "%"PRIu64, node_data->intval);
break;
case PLIST_REAL:
tag = XPLIST_REAL;
- (void)asprintf(&val, "%f", node_data->realval);
+ val = (char*)malloc(64);
+ (void)snprintf(val, 64, "%f", node_data->realval);
break;
case PLIST_STRING: