remove wrong strncmp

This commit is contained in:
pvalchev 2005-11-14 17:23:36 +00:00
parent 50da1cf963
commit 7322e0c08f
2 changed files with 3 additions and 122 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.11 2004/12/11 13:29:21 alek Exp $
# $OpenBSD: Makefile,v 1.12 2005/11/14 17:23:36 pvalchev Exp $
COMMENT= "banner-ad blocking proxy server"
PKGNAME= junkbuster-2.0.2p1
PKGNAME= junkbuster-2.0.2p2
DISTNAME= ijb20
CATEGORIES= www

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-jcc_c,v 1.4 2001/06/09 04:21:29 angelos Exp $
$OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
--- jcc.c.orig Fri Oct 30 22:58:47 1998
+++ jcc.c Sat Jun 9 00:16:47 2001
@@ -226,7 +226,7 @@ chat(struct client_state *csp)
@ -90,125 +90,6 @@ $OpenBSD: patch-jcc_c,v 1.4 2001/06/09 04:21:29 angelos Exp $
p = arg + strlen(arg) - 1;
@@ -692,98 +710,98 @@ main(int argc, char *argv[])
savearg(cmd, arg);
- if(strcmp(cmd, "trustfile") == 0) {
+ if(strncmp(cmd, "trustfile", sizeof(cmd)-1) == 0) {
trustfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "trust_info_url") == 0) {
+ if(strncmp(cmd, "trust_info_url", sizeof(cmd)-1) == 0) {
enlist(trust_info, arg);
continue;
}
- if(strcmp(cmd, "debug") == 0) {
+ if(strncmp(cmd, "debug", sizeof(cmd)-1) == 0) {
debug |= atoi(arg);
continue;
}
- if(strcmp(cmd, "add-forwarded-header") == 0) {
+ if(strncmp(cmd, "add-forwarded-header", sizeof(cmd)-1) == 0) {
add_forwarded = 1;
continue;
}
- if(strcmp(cmd, "single-threaded") == 0) {
+ if(strncmp(cmd, "single-threaded", sizeof(cmd)-1) == 0) {
multi_threaded = 0;
continue;
}
- if(strcmp(cmd, "suppress-vanilla-wafer") == 0) {
+ if(strncmp(cmd, "suppress-vanilla-wafer", sizeof(cmd)-1) == 0) {
suppress_vanilla_wafer = 1;
continue;
}
- if(strcmp(cmd, "wafer") == 0) {
+ if(strncmp(cmd, "wafer", sizeof(cmd)-1) == 0) {
enlist(wafer_list, arg);
continue;
}
- if(strcmp(cmd, "add-header") == 0) {
+ if(strncmp(cmd, "add-header", sizeof(cmd)-1) == 0) {
enlist(xtra_list, arg);
continue;
}
- if(strcmp(cmd, "cookiefile") == 0) {
+ if(strncmp(cmd, "cookiefile", sizeof(cmd)-1) == 0) {
cookiefile = strdup(arg);
continue;
}
- if(strcmp(cmd, "logfile") == 0) {
+ if(strncmp(cmd, "logfile", sizeof(cmd)-1) == 0) {
logfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "blockfile") == 0) {
+ if(strncmp(cmd, "blockfile", sizeof(cmd)-1) == 0) {
blockfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "jarfile") == 0) {
+ if(strncmp(cmd, "jarfile", sizeof(cmd)-1) == 0) {
jarfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "listen-address") == 0) {
+ if(strncmp(cmd, "listen-address", sizeof(cmd)-1) == 0) {
haddr = strdup(arg);
continue;
}
- if(strcmp(cmd, "forwardfile") == 0) {
+ if(strncmp(cmd, "forwardfile", sizeof(cmd)-1) == 0) {
forwardfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "aclfile") == 0) {
+ if(strncmp(cmd, "aclfile", sizeof(cmd)-1) == 0) {
aclfile = strdup(arg);
continue;
}
- if(strcmp(cmd, "user-agent") == 0) {
+ if(strncmp(cmd, "user-agent", sizeof(cmd)-1) == 0) {
uagent = strdup(arg);
continue;
}
- if((strcmp(cmd, "referrer") == 0)
- || (strcmp(cmd, "referer" ) == 0)) {
+ if((strncmp(cmd, "referrer", sizeof(cmd)-1) == 0)
+ || (strncmp(cmd, "referer", sizeof(cmd)-1) == 0)) {
referrer = strdup(arg);
continue;
}
- if(strcmp(cmd, "from") == 0) {
+ if(strncmp(cmd, "from", sizeof(cmd)-1) == 0) {
from = strdup(arg);
continue;
}
- if(strcmp(cmd, "hide-console") == 0) {
+ if(strncmp(cmd, "hide-console", sizeof(cmd)-1) == 0) {
hideConsole = 1;
continue;
}
@@ -891,8 +909,12 @@ main(int argc, char *argv[])
#ifndef _WIN32