chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0ed0735
)
server/admin: Fix core dump if ADD wasn't given enough arguments.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 3 Jan 2007 18:43:20 +0000
(18:43 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 3 Jan 2007 18:43:20 +0000
(18:43 +0000)
Just a stupid off-the-end-of-the-array error.
server/admin.c
patch
|
blob
|
blame
|
history
diff --git
a/server/admin.c
b/server/admin.c
index 4dbaf33e1e89c4e6a33701f281beb58633f854e5..d9a75ec2c68658174fa6c01a056dc086c56754a4 100644
(file)
--- a/
server/admin.c
+++ b/
server/admin.c
@@
-1231,7
+1231,7
@@
static void acmd_add(admin *a, unsigned ac, char *av[])
/* --- Make sure someone's not got there already --- */
/* --- Make sure someone's not got there already --- */
- if (!
*av
)
+ if (!
av[0] || !av[1]
)
goto bad_syntax;
if (p_find(*av)) {
a_fail(a, "peer-exists", "%s", *av, A_END);
goto bad_syntax;
if (p_find(*av)) {
a_fail(a, "peer-exists", "%s", *av, A_END);