t_stub: give test helpers an unlimited max_alloc

Helpers link util2.o but not options.c, so they used the stub's
max_alloc = 0, which makes every my_alloc()/my_strdup() in util2.c abort
with "exceeded --max-alloc=0". The secure_relative_open() fallback path
hits my_strdup() and aborts. Set max_alloc = (size_t)-1.
This commit is contained in:
Andrew Tridgell
2026-06-08 11:30:42 +10:00
parent 0ce3a42bad
commit 67bfe4d1bb

View File

@@ -36,7 +36,10 @@ int preserve_perms = 0;
int preserve_executability = 0;
int omit_link_times = 0;
int open_noatime = 0;
size_t max_alloc = 0; /* max_alloc is needed when combined with util2.o */
size_t max_alloc = (size_t)-1; /* unlimited: helpers link util2.o, where 0 makes
* every my_alloc()/my_strdup() abort with
* "exceeded --max-alloc=0" (hit on the
* secure_relative_open() fallback path). */
char *partial_dir;
char *module_dir;
/* curr_dir[]/curr_dir_len (read by secure_relative_open) are defined in