Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit385a282

Browse files
author
Felipe Zimmerle
committed
Code cosmetics: Reduces the amounts of warning.
Removes the warnings by adding missing headers and removed unused variables.
1 parent1e63e49 commit385a282

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

‎apache2/msc_crypt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ char *normalize_path(modsec_rec *msr, char *input) {
6767
if(uri->path) {
6868
char*Uri=NULL;
6969
intbytes=0;
70-
inti;
70+
/*int i;*/
7171
char*relative_link=NULL;
7272
char*filename=NULL;
7373
char*relative_path=NULL;

‎apache2/msc_json.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@ int DSOLOCAL json_complete(modsec_rec *msr, char **error_msg);
5353

5454
apr_status_tDSOLOCALjson_cleanup(modsec_rec*msr);
5555

56+
intDSOLOCALjson_process_chunk(modsec_rec*msr,constchar*buf,
57+
unsignedintsize,char**error_msg);
58+
5659
#endif
5760
#endif

‎apache2/msc_status_engine.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ int DSOLOCAL msc_status_engine_mac_address (unsigned char *mac)
227227
PIP_ADAPTER_INFOpAdapterInfo;
228228
PIP_ADAPTER_INFOpAdapter=NULL;
229229
DWORDdwRetVal=0;
230-
UINTi;
231230

232231
ULONGulOutBufLen=sizeof (IP_ADAPTER_INFO);
233232
pAdapterInfo= (IP_ADAPTER_INFO*)malloc(sizeof (IP_ADAPTER_INFO));

‎apache2/re_operators.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,6 @@ static int msre_op_detectXSS_execute(modsec_rec *msr, msre_rule *rule, msre_var
20532053
char**error_msg) {
20542054

20552055
intis_xss;
2056-
intcapture;
20572056

20582057
is_xss=libinjection_xss(var->value,var->value_len);
20592058

‎apache2/re_variables.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,6 @@ static int var_full_request_generate(modsec_rec *msr, msre_var *var,
19931993
failed_fill_buffer:
19941994
failed_not_enough_mem:
19951995
failed_measure_buffer:
1996-
no_buffer:
19971996
return0;
19981997
}
19991998

‎nginx/modsecurity/config‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#!/bin/sh
22

3-
# This file should be auto-generated whenever modsecurity is configured as standalone.
4-
53
CFLAGS="$CFLAGS\
64
-I/usr/include/apr-1.0\
75
-I/usr/include/apr-1.0 -I/usr/include\
86
-I/usr/include/apache2\
97
-I/usr/include/libxml2\
108
-DWITH_LUA -I/usr/include/lua5.1\
119
-DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500 -DREQUEST_EARLY\
12-
"
10+
\
11+
-DWITH_YAJL -I/usr/include/yajl"
1312

1413

1514
CORE_LIBS="$CORE_LIBS\
@@ -20,7 +19,8 @@ CORE_LIBS="$CORE_LIBS \
2019
-lxml2\
2120
-llua5.1\
2221
-lpcre\
23-
-L/usr/lib -lcap"
22+
-L/usr/lib -lcap\
23+
-lyajl"
2424

2525
ngx_addon_name=ngx_http_modsecurity
2626

‎standalone/api.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040

4141
#include"api.h"
4242

43+
#ifdefWIN32
44+
#include"msc_status_engine.h"
45+
#endif
46+
4347
externvoid*modsecLogObj;
4448
externvoid (*modsecLogHook)(void*obj,intlevel,char*str);
4549
externint (*modsecDropAction)(request_rec*r);
@@ -75,6 +79,7 @@ DECLARE_HOOK(void,insert_filter,(request_rec *r))
7579
DECLARE_HOOK(void,insert_error_filter,(request_rec*r))
7680

7781
char*sa_name="standalone";
82+
constchar*sa_name_argv[]= {"standalone",NULL };
7883
server_rec*server;
7984
apr_pool_t*pool=NULL;
8085

@@ -135,7 +140,7 @@ server_rec *modsecInit() {
135140
server->port=80;
136141
server->process=apr_palloc(pool,sizeof(process_rec));
137142
server->process->argc=1;
138-
server->process->argv=&sa_name;
143+
server->process->argv=sa_name_argv;
139144
server->process->pconf=pool;
140145
server->process->pool=pool;
141146
server->process->short_name=sa_name;
@@ -223,7 +228,6 @@ apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
223228
}
224229

225230
apr_status_tap_http_out_filter(ap_filter_t*f,apr_bucket_brigade*b) {
226-
apr_status_trc;
227231
apr_bucket_brigade*bb_out= (apr_bucket_brigade*)f->ctx;
228232

229233
APR_BRIGADE_CONCAT(bb_out,b);
@@ -662,9 +666,9 @@ int modsecFinishRequest(request_rec *r) {
662666
// destroy only the connection pool
663667
intmodsecFinishConnection(conn_rec*c)
664668
{
665-
666669
apr_pool_destroy(c->pool);
667670

671+
return0;
668672
}
669673

670674

@@ -713,4 +717,4 @@ void modsecStatusEngineCall()
713717
"SecStatusEngine to On.\n");
714718
}
715719
}
716-
#endif
720+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp