]> andersk Git - moira.git/commitdiff
don't allow a trailing backslash on any argument (it will quote the closing
authormar <mar>
Mon, 26 Jun 1989 14:09:11 +0000 (14:09 +0000)
committermar <mar>
Mon, 26 Jun 1989 14:09:11 +0000 (14:09 +0000)
doublequote and confuse the Ingres interpreter)

server/qrtn.qc

index 88b209e868d3fb22c24c0b10588547e9ae539cc0..ec9cbe316a5f8a48a22f35b079d5d757741f8d8e 100644 (file)
@@ -434,15 +434,18 @@ sms_verify_query(cl, q, argc, argv_ro)
     register struct validate *v = q->validate;
     register int i;
     register int privileged = 0;
+    int len;
 
     /* copy the arguments into a local argv that we can modify */
     if (argc >= QMAXARGS)
       return(SMS_ARGS);
     for (i = 0; i < argc; i++) {
-       if (strlen(argv_ro[i]) < ARGLEN)
+       if ((len = strlen(argv_ro[i])) < ARGLEN)
            strcpy(Argv[i], argv_ro[i]);
        else
            return(SMS_ARG_TOO_LONG);
+       if (Argv[i][len-1] == '\\')
+         return(SMS_BAD_CHAR);
     }
 
     /* check initial query access */
This page took 0.033198 seconds and 5 git commands to generate.