]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
aft.c: Fix a nasty memory corruption bug in afs_ls on 64 bit archs.
[paraslash.git] / 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;