Commit 1bf28fb6 authored by Nikias Bassen's avatar Nikias Bassen

xplist: Use proper variable size for integer from string parsing

parent 0c666824
...@@ -984,11 +984,11 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth) ...@@ -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); data->intval = strtoull((char*)str, NULL, 0);
if (is_negative || (data->intval <= INT64_MAX)) { if (is_negative || (data->intval <= INT64_MAX)) {
int64_t v = data->intval; uint64_t v = data->intval;
if (is_negative) { if (is_negative) {
v = -v; v = -v;
} }
data->intval = (uint64_t)v; data->intval = v;
data->length = 8; data->length = 8;
} else { } else {
data->length = 16; data->length = 16;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment