Displaying 2 results from an estimated 2 matches for "size_expunged".
2015 Apr 09
2
Trash Plugin bugs
...1 + ctx->count_over);
+ ret = trash_try_clean_mails(ctx, size_needed, count_needed);
3. Trash plugin does not check 'unlimited' values in bytes_ceil/count_ceil and may overflow them
when add expunged size/messages
- ctx->bytes_ceil += size_expunged;
- ctx->count_ceil += expunged_count;
+ if (ctx->bytes_ceil!=(uint64_t)-1) {
+ ctx->bytes_ceil += size_expunged;
+ }
+ if (ctx->count_ceil!=(uint64_t)-1) {
+ ctx->count_ceil += expunged_count;
+ }
See attached patch.
-------...
2015 Apr 13
0
Trash Plugin bugs
> 3. Trash plugin does not check 'unlimited' values in
> bytes_ceil/count_ceil and may overflow them
> when add expunged size/messages
check any overflow
- ctx->bytes_ceil += size_expunged;
- ctx->count_ceil += expunged_count;
+ if (ctx->bytes_ceil > ((uint64_t)-1 - size_expunged)) {
+ ctx->bytes_ceil = (uint64_t)-1;
+ } else {
+ ctx->bytes_ceil += size_expunged;
+ }
+ if (ctx->count_ceil > ((uint64_...