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

Kris Moore kris at pcbsd.org
Mon May 21 09:03:22 PDT 2012

On 05/16/2012 18:12, Leslie wrote:
> 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.
> _______________________________________________
> Dev mailing list
> Dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/dev

Good catch! Fixed in SVN :)

Kris Moore
PC-BSD Software

More information about the Dev mailing list