rem: if ((strncmp(mapPtr->url, url, plen) == 0) &&
add: if ((strncmp(mapPtr->url, url, (size_t)plen) == 0) &&
context: CgiInit(Cgi *cgiPtr, Map *mapPtr, Ns_Conn *conn){    Mod		   *modPtr;    Ns_DString     *dsPtr;    int             ulen, plen, i;    struct stat     st;    char           *s, *e;    char    	   *url = conn->request->url;    char	   *server = Ns_ConnServer(conn);        modPtr = mapPtr->modPtr;    memset(cgiPtr, 0, ((char *) &cgiPtr->ds[0]) - (char *) cgiPtr);    cgiPtr->buf[0] = '\0';    cgiPtr->modPtr = modPtr;    cgiPtr->pid = -1;    cgiPtr->ofd = cgiPtr->ifd = -1;    cgiPtr->ptr = cgiPtr->buf;    for (i = 0; i < NDSTRINGS; ++i) {	Ns_DStringInit(&cgiPtr->ds[i]);    }    /*     * Determine the executable or script to run.     */    ulen = strlen(url);    plen = strlen(mapPtr->url);    if ((strncmp(mapPtr->url, url, plen) == 0) &&    	(ulen == plen || url[plen] == '/')) {	        if (mapPtr->path == NULL) {            /*             * No path mapping, script in pages directory:             *              * 1. Path is Url2File up to the URL prefix.	     * 2. SCRIPT_NAME is the URL prefix.	     * 3. PATH_INFO is everything past SCRIPT_NAME in the URL.             */	                 cgiPtr->name = Ns_DStringNAppend(CgiDs(cgiPtr), url, plen);	    dsPtr = CgiDs(cgiPtr);            Ns_UrlToFile(dsPtr, server, cgiPtr->name);	    cgiPtr->path = dsPtr->string;            cgiPtr->pathinfo = url + plen;	            } else if (stat(mapPtr->path, &st) != 0) {	    goto err;	    	} else if (S_ISDIR(st.st_mode)) {            /*             * Path mapping is a directory:             *              * 1. The script file is the first path element in the URL past             * the mapping prefix.	     * 2. SCRIPT_NAME is the URL up to and including the	     * script file.	     * 3. PATH_INFO is everything in the URL past SCRIPT_NAME.	     * 4. The script pathname is the script prefix plus the	     * script file.             */            if (plen == ulen) {		goto err;            }            s = url + plen + 1;            e = strchr(s, '/');	    if (e != NULL) {		*e = '\0';	    }	    cgiPtr->name = Ns_DStringAppend(CgiDs(cgiPtr), url);            cgiPtr->path = Ns_DStringVarAppend(CgiDs(cgiPtr),	    	    	    	    	      mapPtr->path, "/", s, NULL);    	    if (e == NULL) {		cgiPtr->pathinfo = "";	    } else {		*e = '/';		cgiPtr->pathinfo = e;	    }        } else if (S_ISREG(st.st_mode)) {            /*             * When the path mapping is (or at least could be) a file:             *              * 1. The script pathname is the mapping.	     * 2. SCRIPT_NAME is the url prefix.	     * 3. PATH_INFO is everything in the URL past SCRIPT_NAME.             */	    cgiPtr->path = Ns_DStringAppend(CgiDs(cgiPtr), mapPtr->path);	    cgiPtr->name = Ns_DStringAppend(CgiDs(cgiPtr), mapPtr->url);            cgiPtr->pathinfo = url + plen;    	} else {	    goto err;        }    } else {        /*         * The prefix didn't match.  Assume the mapping was a wildcard         * mapping like *.cgi which was fetched by UrlSpecificGet() but         * skipped by strncmp() above. In this case:         *          * 1. The script pathname is the URL file in the pages directory.	 * 2. SCRIPT_NAME is the URL.	 * 3. PATH_INFO is "".         */	 	dsPtr = CgiDs(cgiPtr);   	Ns_UrlToFile(dsPtr, server, url);	cgiPtr->path = dsPtr->string;	cgiPtr->name = url;        cgiPtr->pathinfo = url + ulen;    }    /*     * Copy the script directory and see if the script is NPH.     */         s = strrchr(cgiPtr->path, '/');    if (s == NULL || access(cgiPtr->path, R_OK) != 0) {	goto err;    }    *s = '\0';    cgiPtr->dir = Ns_DStringAppend(CgiDs(cgiPtr), cgiPtr->path);    *s++ = '/';    if (strncmp(s, "nph-", 4) == 0) {        cgiPtr->flags |= CGI_NPH;    }    /*     * Look for a script interpreter.     */    if (modPtr->interps != NULL    	&&(s = strrchr(cgiPtr->path, '.')) != NULL        && (cgiPtr->interp = Ns_SetIGet(modPtr->interps, s)) != NULL) {    	cgiPtr->interp = Ns_DStringAppend(CgiDs(cgiPtr), cgiPtr->interp);        s = strchr(cgiPtr->interp, '(');        if (s != NULL) {            *s++ = '\0';            e = strchr(s, ')');            if (e != NULL) {                *e = '\0';            }            cgiPtr->interpEnv = Ns_ConfigGetSection(s);        }    }    if (cgiPtr->interp != NULL) {        cgiPtr->exec = cgiPtr->interp;    } else {        cgiPtr->exec = cgiPtr->path;    }    return NS_OK;err:    CgiFree(cgiPtr);    return NS_ERROR;}