Skip to content

Commit

Permalink
Build: xml: INFINITY could overflow for 16-bit ints - explicitly cast it
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Apr 8, 2014
1 parent a951f4b commit d9fbba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,7 @@ expand_plus_plus(xmlNode * target, const char *name, const char *value)
int_value += offset;

if (int_value > INFINITY) {
int_value = INFINITY;
int_value = (int)INFINITY;
}

crm_xml_add_int(target, name, int_value);
Expand Down

0 comments on commit d9fbba5

Please sign in to comment.