[PC-BSD Dev] minor bug in softmanager-main.cpp

Leslie leslie.translate at yahoo.co.uk
Wed May 16 15:12:50 PDT 2012


Hello

I'm one of the Hungarian translators of PC-BSD, and I think I have found a minor bug while I was viewing the source code.

In 'pc-softwaremanager/softmanager-main.cpp' there is a function called "QString PBM::bytesToHumanReadable( float bytes )". If this gets a huge number, you will get an Array index out of bound error or something similar, because variable "i" will be 5, and that is larger than the size of the list of suffixes.

I would use "(i < suffix.size() - 1)" instead of "(i < 5)" in the while loop.


Regards, Horváth, László.

PS: If I misunderstood something, then I'm sorry.


More information about the Dev mailing list