From: Andre Date: Fri, 14 Apr 2006 13:02:44 +0000 (+0200) Subject: com_cs: Return a syntax error if argc > 2. X-Git-Tag: v0.2.12~99 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=4567280e18c11f1f077b00421bca8e25d2dbab83;p=paraslash.git com_cs: Return a syntax error if argc > 2. Previously, argv[i] was silently ignored for i > 1. --- diff --git a/mysql_selector.c b/mysql_selector.c index edd2c085..f41afcdf 100644 --- a/mysql_selector.c +++ b/mysql_selector.c @@ -2040,8 +2040,10 @@ static int com_cs(int fd, int argc, char *argv[]) char *old_stream = get_current_stream(); int csp = !strcmp(argv[0], "csp"); + ret = -E_MYSQL_SYNTAX; + if (argc > 2) + goto out; if (argc == 1) { - ret = -E_MYSQL_SYNTAX; if (csp) goto out; ret = send_va_buffer(fd, "%s\n", old_stream);