]> git.tue.mpg.de Git - paraslash.git/commitdiff
com_cs: Return a syntax error if argc > 2.
authorAndre <maan@p133.(none)>
Fri, 14 Apr 2006 13:02:44 +0000 (15:02 +0200)
committerAndre <maan@p133.(none)>
Fri, 14 Apr 2006 13:02:44 +0000 (15:02 +0200)
Previously, argv[i] was silently ignored for i > 1.

mysql_selector.c

index edd2c08554f8f3a241c801719ba3c368488fdc71..f41afcdff61b0f14c518b919028e6ee9d879547d 100644 (file)
@@ -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);