Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6.0
-
None
-
None
Description
Deserialize functionality for xsd:unsignedInt values is done via atoi() function. Here is an example of the generated code for unsignedInt element:
text_value = axiom_element_get_text(current_element, env, current_node);
if(text_value != NULL)
{
status = adb_clientClass_set_priority(_clientClass, env,
atoi(text_value));
}
Here is how that element is defined in XSD file:
<xsd:element name="priority" type="xsd:unsignedInt">
...
</xsd:element
Unfortunately atoi is returning int (signed integer) and as a result whenever the value for that unsignedInt element is set to be large than the maximum value for SIGNED integer (larger than 2147483647) it is decreased to 2147483647, while the maximum value for unsignedInt should be 4294967295.
Once the atoi() in generated code is replaced with strtoul() the problem is gone.