User Name
Password

Go Back   Planetarion Forums > vChange Tracker > integer overflow in alliance dump

Change ID: 35 Type: Bug
Title: integer overflow in alliance dump Status: Closed (Fixed & Tested)
Severity: Minor Version: Round 35 - Game
Assigned To: Appocomaster

[Add Response] | [Subscribe]

Planetarion Support Team Member Will
25 Dec 2009 14:04
i reported this 2 rounds ago (and i can't believe i'd be the first to notice)...

alliance score in the dump files overflows perl max integer, making the entire file useless. it must be simple to fix because the problem does not affect the alliance list on the universe page. i also have to assume there is a similar problem for all number values in all dump files.

PA TeamAppocomaster
15 Jan 2010 23:59
Doesn't this only happen during havoc?

Planetarion Support Team MemberWill
16 Jan 2010 11:51
yes, with the current setup it happens some time during havoc every round. however, who's to say the situation won't change some day?

a simple sprintf("%u", $number) should be enough to output an unsigned integer since negative values are impossible however that would just overflow as well, using %s would just output as a string and allow even larger numbers.

PA TeamAppocomaster
16 Jan 2010 12:11
i didn't think of using %s. I tried %-14.0f but that added lots of spaces. Will try %s instead.

PA TeamAppocomaster
16 Jan 2010 12:26
i didn't think of using %s. I tried %-14.0f but that added lots of spaces. Will try %s instead.

PA TeamAppocomaster
16 Jan 2010 20:09
Fixed & Tested


[Add Response] | [Subscribe]


All times are GMT +1. The time now is 21:35.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2002 - 2018