gaim/gaim

Parents b2b9fa1055c6
Children bd48f5a5a0ba
This fixes a crash for the size being > 1024 GB. (This is happening in bug #1115388) There are several other problems; for one, that file size is certainly not > 1024 GB. Also problematic is that the gaim_str_size_to_units accepts a variable of type size_t (which may be unsigned) but proceeds to check if it is -1.
  • +1 -1
    src/util.c
  • --- a/src/util.c Thu Feb 03 14:53:18 2005 -0500
    +++ b/src/util.c Thu Feb 03 17:35:50 2005 -0500
    @@ -2370,7 +2370,7 @@
    else {
    size_mag = (float)size;
    - while ((size_index < 4) && (size_mag > 1024)) {
    + while ((size_index < 3) && (size_mag > 1024)) {
    size_mag /= 1024;
    size_index++;
    }