Displaying 2 results from an estimated 2 matches for "argv_assemble".
2024 Aug 16
1
[Bug 3718] New: Small memory leak (+patch) in process_server_config_line_depth
...gnee: unassigned-bugs at mindrot.org
Reporter: alarrosa at suse.com
Created attachment 3831
--> https://bugzilla.mindrot.org/attachment.cgi?id=3831&action=edit
Patch that fixes the memory leak
While running sshd under valgrind I noticed a small memory leak.
The return value of argv_assemble is owned by the caller and should be
free'd. When processing the sSubsystem case there are two calls to
argv_assemble but only one of them is freed. The attached patch adds
the missing free to fix this small (29 bytes according to valgrind)
memory leak.
The output from valgrind:
> ==115369...
2024 Feb 08
3
[Bug 3667] New: Trailing space is added when parsing Subsystem in sshd_config
...rsion 9.5p1.
Part of process_server_config_line_depth function on servconf.c is
something like this.
options->subsystem_command[options->num_subsystems] =
xstrdup(arg);
/* Collect arguments (separate to executable) */
arg = argv_assemble(1, &arg); /* quote command
correctly */
arg2 = argv_assemble(ac, av); /* rest of command */
xasprintf(&options->subsystem_args[options->num_subsystems],
"%s %s", arg, arg2);
free(arg2);
Subsystem definion i...