JiphuTzu / pococapsule

Automatically exported from code.google.com/p/pococapsule
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
target for 1.2

Original comment by kjin...@gmail.com on 31 Mar 2010 at 5:27

GoogleCodeExporter commented 9 years ago

Original comment by kjin...@gmail.com on 3 Apr 2010 at 6:05