I found a bug,
if you set a quota for a user
the qmailadmin convert from MB to bytes with .00 at the end.
 
 
-----------------------------------
 
File util.c
 
 
int quota_to_bytes(char returnval[], char *quota) {
    char *tmpstr;
    double tmp;
 
    if (quota == NULL) { return 1; }
    if (tmp = atol(quota)) { tmp *= 1048576; }
    else { return 1; }
    sprintf(returnval, "%-2.2lf", tmp);                  <<< -----------   bug
    return 0;
}
 
 
-------------------------------------------
 
    sprintf(returnval, "%-2.0lf", tmp);                  <<< ------------  correction
                                ^^^^^^
 
 

Reply via email to