https://bz.apache.org/ooo/show_bug.cgi?id=112383
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] OS|All |Unix, all Latest|--- |4.1.1 Confirmation on| | --- Comment #4 from [email protected] --- Bug happens only on LP64 systems (all *nix and MacOS X, but not Windows which is LLP64) due to the fact the "long l" in function ImpScan() in main/basic/source/sbx/sbxscan.cxx is 64 bits as opposed to 32 bits on the IL32 systems the code was written for. As a result, the "long l" doesn't overflow, which is why it gets to 4,294,967,295, exceeding the maximum value of a 32 bit variable which is 2,147,483,647, at which point it should have wrapped and become negative, eventually reaching -1. The fix is easy, either it needs to be converted to another type (eg. int or sal_Int32) to stay 32 bit on LP64 systems, or the "long l" can stay but needs "&= 0xFFFFFFFF" and then sign extension back to 64 bits before reading it to assign to "nVal" and comparing it against SbxMININT and SbxMAXINT. But I am concerned that on LP64 systems there might be many other places with bugs such as this... -- You are receiving this mail because: You are on the CC list for the issue.
