diff options
author | Nikias Bassen | 2011-05-29 03:36:44 +0200 |
---|---|---|
committer | Nikias Bassen | 2011-05-29 03:36:44 +0200 |
commit | 7f376a838be410af848b8b6689180baf79140ded (patch) | |
tree | 059215e89c532141887c3945e287f1e53021971c /src/xplist.c | |
parent | f058a5aeddb57b4f453952bc4c03d26501f764ee (diff) | |
download | libplist-7f376a838be410af848b8b6689180baf79140ded.tar.gz libplist-7f376a838be410af848b8b6689180baf79140ded.tar.bz2 |
Use malloc+snprintf instead of asprintf
Diffstat (limited to 'src/xplist.c')
-rw-r--r-- | src/xplist.c | 6 |
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: |