packages/net/samba4/patches/103-tmsize-overflow-fix.patch
Andy Walsh 8a20820a9b
samba4: revert to 4.9.11
* revert to 4.9.x series (4.10 needs too many unofficial patches and has weird waf bugs)
* cleanup patches
* enable AD_DC build option again

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
(cherry-picked from 2f2a4bccd9)
2019-09-26 19:36:25 -07:00

21 lines
670 B
Diff

--- a/source3/modules/vfs_fruit.c 2019-07-09
+++ b/source3/modules/vfs_fruit.c 2019-07-09
@@ -6995,12 +6995,12 @@ static bool fruit_tmsize_do_dirent(vfs_h
return true;
}
- if (bandsize > SIZE_MAX/nbands) {
- DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
- bandsize, nbands);
- return false;
- }
- tm_size = bandsize * nbands;
+ // if (bandsize > SIZE_MAX/nbands) {
+ // DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
+ // bandsize, nbands);
+ // return false;
+ // }
+ tm_size = (off_t)bandsize * (off_t)nbands;
if (state->total_size + tm_size < state->total_size) {
DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",