You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
670 B

  1. --- a/source3/modules/vfs_fruit.c 2019-07-09
  2. +++ b/source3/modules/vfs_fruit.c 2019-07-09
  3. @@ -6995,12 +6995,12 @@ static bool fruit_tmsize_do_dirent(vfs_h
  4. return true;
  5. }
  6. - if (bandsize > SIZE_MAX/nbands) {
  7. - DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
  8. - bandsize, nbands);
  9. - return false;
  10. - }
  11. - tm_size = bandsize * nbands;
  12. + // if (bandsize > SIZE_MAX/nbands) {
  13. + // DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
  14. + // bandsize, nbands);
  15. + // return false;
  16. + // }
  17. + tm_size = (off_t)bandsize * (off_t)nbands;
  18. if (state->total_size + tm_size < state->total_size) {
  19. DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",