From 1bf28fb685f0ec46db3495004fa5fadb3d9d10ad Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 8 Feb 2017 02:45:46 +0100 Subject: xplist: Use proper variable size for integer from string parsing --- src/xplist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xplist.c b/src/xplist.c index e8f80fb..5f63a94 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -984,11 +984,11 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth) } data->intval = strtoull((char*)str, NULL, 0); if (is_negative || (data->intval <= INT64_MAX)) { - int64_t v = data->intval; + uint64_t v = data->intval; if (is_negative) { v = -v; } - data->intval = (uint64_t)v; + data->intval = v; data->length = 8; } else { data->length = 16; -- cgit v1.1-32-gdbae