Skip to content

unsigned long integer method-arg value larger than 2G will be truncated to 2G #9

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?

<method-arg type="ulong" value="2200000000"/>

What is the expected output? What do you see instead?

This argument should be passed as 2200000000. Rather, it is passed as
2147483647 (i.e. 2G).

What version of the product are you using? On what operating system?

1.0 and 1.1, on all platforms

Please provide any additional information below.

The problem is caused by the use of atol(). This function truncate any
value large than 2G or smaller than -2G to 2G/-2G respectively. The fix
will be to replace atol() by strtoul(). 

see discussion in news group thread:
<http://groups.google.com/group/pococapsule/browse_thread/thread/1504bf371ecc9cb
1>

Original issue reported on code.google.com by kjin...@gmail.com on 11 Feb 2010 at 6:30

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions