Bug-Debian: http://bugs.debian.org/654368
On systems with very large amonut of RAM when they use the -b or --bytes
option on free you get overflow and free shows a negative amount of
memory, which is obviously wrong.
if (!(flags & FREE_HUMANREADABLE)) {
if (args.exponent == 1) {
/* in bytes, which can not be in SI */
- snprintf(buf, sizeof(buf), "%ld", (long int)(size * 1024));
+ snprintf(buf, sizeof(buf), "%lld", (long long int)(size * 1024));
return buf;
}
if (args.exponent == 2) {