]> andersk Git - moira.git/commitdiff
Check that the number of query arguments is correct earlier on in the
authordanw <danw>
Wed, 1 Oct 1997 19:57:10 +0000 (19:57 +0000)
committerdanw <danw>
Wed, 1 Oct 1997 19:57:10 +0000 (19:57 +0000)
verification stage.

server/qrtn.pc

index 0f1a8b8913584767d8d182b0e88b9520f69327db..1ec4d5ce4519463e5d41ed8821e9d12296618a8c 100644 (file)
@@ -460,9 +460,12 @@ int mr_verify_query(cl, q, argc, argv_ro)
 
     privileged = 0;
 
+    /* check argument count */
+    argreq = q->argc;
+    if (q->type == UPDATE || q->type == APPEND) argreq += q->vcnt;
+    if (argc != argreq) return(MR_ARGS);
+
     /* copy the arguments into a local argv that we can modify */
-    if (argc >= QMAXARGS)
-      return(MR_ARGS);
     for (i = 0; i < argc; i++) {
        for (to=Argv[i], fr=argv_ro[i], stop=to+ARGLEN; (*fr) && (to<stop);)
          *to++ = *fr++;
@@ -482,11 +485,6 @@ int mr_verify_query(cl, q, argc, argv_ro)
     if (status == MR_SUCCESS)
        privileged++;
 
-    /* check argument count */
-    argreq = q->argc;
-    if (q->type == UPDATE || q->type == APPEND) argreq += q->vcnt;
-    if (argc != argreq) return(MR_ARGS);
-
     /* validate arguments */
     if (v && v->valobj) {
        status = validate_fields(q, Argv, v->valobj, v->objcnt);
This page took 0.250387 seconds and 5 git commands to generate.