Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4151:2e418435b460 HEAD
Fixed calculation overflows
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 09 Apr 2006 18:08:23 +0300 |
parents | 49e024519e22 |
children | e2edd333c473 |
files | src/plugins/quota/quota-fs.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/quota/quota-fs.c Sun Apr 09 17:48:34 2006 +0300 +++ b/src/plugins/quota/quota-fs.c Sun Apr 09 18:08:23 2006 +0300 @@ -284,8 +284,10 @@ return -1; } #endif - *value_r = dqblk.dqb_curblocks * root->mount->blk_size / 1024; - *limit_r = dqblk.dqb_bsoftlimit * root->mount->blk_size / 1024; + *value_r = (uint64_t)dqblk.dqb_curblocks * + (uint64_t)root->mount->blk_size / 1024; + *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * + (uint64_t)root->mount->blk_size / 1024; return 1; }