[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2928-g4c3bfea
Kai Blin
kai at samba.org
Fri Jun 20 09:02:26 GMT 2008
On Thursday 19 June 2008 20:44:57 coffeedude at samba.org wrote:
> - Log -----------------------------------------------------------------
> commit 4c3bfea9f8d238f9100eaa264b9b2941dff5a6dd
> Author: root <root at dolby.ad.plainjoe.org>
> Date: Thu Jun 19 12:14:32 2008 -0500
>
> net: Fix crash when specifying invalid options on the command line
>
> -----------------------------------------------------------------------
>
> Summary of changes:
> source/utils/net_util.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
>
> Changeset truncated at 500 lines:
>
> diff --git a/source/utils/net_util.c b/source/utils/net_util.c
> index 6029231..8938b9c 100644
> --- a/source/utils/net_util.c
> +++ b/source/utils/net_util.c
> @@ -550,6 +550,14 @@ int net_run_function(struct net_context *c, int argc,
> const char **argv, const char *whoami, struct functable *table)
> {
> int i;
> +
> + if (!table) {
> + d_fprintf(stderr, "Invalid command. Run \"%s\" for more details.\n",
> + whoami);
> + return 1;
> + }
I'm unclear how this ever could happen for invalid user input. The only way
table can be NULL is by someone creating a new net subcommand calling
net_run_function() with a NULL for the table. Otherwise it's always passed to
net_run_function(), user input is not related to this.
How do you get a crash there? I tried "net qwerty", and net does is telling me
that "net qwerty" is an invalid command.
Cheers,
Kai
--
Kai Blin
WorldForge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.samba.org/archive/samba-technical/attachments/20080620/6070b68e/attachment.bin
More information about the samba-technical
mailing list