git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d75a428
)
Don't crash when doing command name completion. Fixes debian bug #194776
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 29 May 2003 15:39:53 +0000
(15:39 +0000)
committer
Jelmer Vernooij
<jelmer@samba.org>
Thu, 29 May 2003 15:39:53 +0000
(15:39 +0000)
(This used to be commit
45b0a63aba1c974e5e38f8f95bc158bc30a05a3b
)
source3/client/client.c
patch
|
blob
|
history
diff --git
a/source3/client/client.c
b/source3/client/client.c
index 690cc99f7feb2ddd6847d5d46d4188e1db20c48c..918b435b2d19dfb1ca930a433a0be8a5261a9196 100644
(file)
--- a/
source3/client/client.c
+++ b/
source3/client/client.c
@@
-2328,9
+2328,11
@@
static char **completion_fn(const char *text, int start, int end)
if (sp == NULL)
return NULL;
- for (i = 0; commands[i].
name; i++)
+ for (i = 0; commands[i].
description; i++) {
if ((strncmp(commands[i].name, text, sp - buf) == 0) && (commands[i].name[sp - buf] == 0))
break;
+ }
+
if (commands[i].name == NULL)
return NULL;