Menu

#2386 (ok 2.10.1) pow(int,int) causes overflow

2.10.0.2
fixed
None
1
2013-06-11
2007-03-07
Erik Krause
No

On PHP 4.4.6 (HP-UX seastar B.11.23 U ia64) apparently all calls to pow() with integer values in common.lib.php cause an overflow (for higher $exp values of course) resulting in a display of "0.0 EiB" for all byte size values (the result of pow(10, 6) is zero f.e.)

Workaround is to specify the constant integer values as floats(10.0 instead of 10 f.e.) In 2.10.0.2 common.lib.php this applies to lines 1516, 1517, 1522, 1524, 1607, 1608, 1613, 1614, 1621 and 1622.

Discussion

  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    fixed in svn trunk and QA_2_10

     
  • Sebastian Mendel

    • priority: 5 --> 1
    • assigned_to: nobody --> cybot_tm
    • summary: pow(int,int) causes overflow --> (ok 2.10.1) pow(int,int) causes overflow
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-04-24
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed