projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74d8b44
)
command.c: Fix a bug in get_cmd_ptr().
author
Andre Noll
<maan@systemlinux.org>
Sat, 15 Sep 2007 20:09:31 +0000
(22:09 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 15 Sep 2007 20:09:31 +0000
(22:09 +0200)
Caused handler to segfault if an invalid command was given.
command.c
patch
|
blob
|
history
diff --git
a/command.c
b/command.c
index 516a62fe520887e1b015ff8e159b8027dd86b232..212a1800e1a32726096c3461c05ee2e9a3bacbfb 100644
(file)
--- a/
command.c
+++ b/
command.c
@@
-473,7
+473,7
@@
static struct server_command *get_cmd_ptr(const char *name, char **handler)
if (!strcmp(cmd->name, name))
return cmd;
/* not found, look for commands supported by afs */
- for (cmd = afs_cmds; cmd; cmd++)
+ for (cmd = afs_cmds; cmd
->name
; cmd++)
if (!strcmp(cmd->name, name))
return cmd;
return NULL;