mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Updates to quiet some compiler warnings.
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,11 +1,13 @@
|
|||||||
|
|
||||||
01 Mar 2007 - 2.2.0
|
?? ??? 2007 - ?????
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
* Fixed the date on the 2.1.0 release from 2006 to 2007 below.
|
* Fixed the date on the 2.1.0 release from 2006 to 2007 below.
|
||||||
|
|
||||||
* Fixed some casting issues for compiling on NetWare (patch from Guenter_Knauf).
|
* Fixed some casting issues for compiling on NetWare (patch from Guenter_Knauf).
|
||||||
|
|
||||||
|
* Updates to quiet some compiler warnings.
|
||||||
|
|
||||||
|
|
||||||
23 Feb 2007 - 2.1.0
|
23 Feb 2007 - 2.1.0
|
||||||
-------------------
|
-------------------
|
||||||
|
@@ -291,7 +291,7 @@ static int multipart_process_part_header(modsec_rec *msr, char **error_msg) {
|
|||||||
*/
|
*/
|
||||||
static int multipart_process_part_data(modsec_rec *msr, char **error_msg) {
|
static int multipart_process_part_data(modsec_rec *msr, char **error_msg) {
|
||||||
char *p = msr->mpd->buf + (MULTIPART_BUF_SIZE - msr->mpd->bufleft) - 2;
|
char *p = msr->mpd->buf + (MULTIPART_BUF_SIZE - msr->mpd->bufleft) - 2;
|
||||||
char localreserve[2];
|
char localreserve[2] = { '\0', '\0' }; /* initialized to quiet warning */
|
||||||
int bytes_reserved = 0;
|
int bytes_reserved = 0;
|
||||||
|
|
||||||
if (error_msg == NULL) return -1;
|
if (error_msg == NULL) return -1;
|
||||||
|
@@ -666,11 +666,11 @@ int urldecode_nonstrict_inplace_ex(unsigned char *input, long int input_len, int
|
|||||||
*d++ = c2;
|
*d++ = c2;
|
||||||
count += 3;
|
count += 3;
|
||||||
i += 3;
|
i += 3;
|
||||||
*invalid_count++;
|
(*invalid_count)++; /* parens quiet compiler warning */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Not enough bytes available, copy the raw bytes. */
|
/* Not enough bytes available, copy the raw bytes. */
|
||||||
*invalid_count++;
|
(*invalid_count)++; /* parens quiet compiler warning */
|
||||||
|
|
||||||
*d++ = '%';
|
*d++ = '%';
|
||||||
count++;
|
count++;
|
||||||
|
@@ -646,7 +646,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
|||||||
if (*s != c) {
|
if (*s != c) {
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
} else {
|
} else {
|
||||||
*s++;
|
(*s)++; /* parens quiet compiler warning */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*d = '\0';
|
*d = '\0';
|
||||||
|
@@ -261,7 +261,7 @@ static int msre_op_validateDTD_execute(modsec_rec *msr, msre_rule *rule, msre_va
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dtd = xmlParseDTD(NULL, rule->op_param); /* EHN support relative filenames */
|
dtd = xmlParseDTD(NULL, (const xmlChar *)rule->op_param); /* EHN support relative filenames */
|
||||||
if (dtd == NULL) {
|
if (dtd == NULL) {
|
||||||
*error_msg = apr_psprintf(msr->mp, "XML: Failed to load DTD: %s", rule->op_param);
|
*error_msg = apr_psprintf(msr->mp, "XML: Failed to load DTD: %s", rule->op_param);
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -370,7 +370,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
|
|||||||
/* Process the XPath expression. */
|
/* Process the XPath expression. */
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
xpathExpr = var->param;
|
xpathExpr = (const xmlChar*)var->param;
|
||||||
|
|
||||||
xpathCtx = xmlXPathNewContext(msr->xml->doc);
|
xpathCtx = xmlXPathNewContext(msr->xml->doc);
|
||||||
if (xpathCtx == NULL) {
|
if (xpathCtx == NULL) {
|
||||||
@@ -392,7 +392,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
|
|||||||
if (parse_name_eq_value(mptmp, action->param, &prefix, &href) < 0) return -1;
|
if (parse_name_eq_value(mptmp, action->param, &prefix, &href) < 0) return -1;
|
||||||
if ((prefix == NULL)||(href == NULL)) return -1;
|
if ((prefix == NULL)||(href == NULL)) return -1;
|
||||||
|
|
||||||
if(xmlXPathRegisterNs(xpathCtx, prefix, href) != 0) {
|
if(xmlXPathRegisterNs(xpathCtx, (const xmlChar*)prefix, (const xmlChar*)href) != 0) {
|
||||||
msr_log(msr, 1, "Failed to register XML namespace href \"%s\" prefix \"%s\".",
|
msr_log(msr, 1, "Failed to register XML namespace href \"%s\" prefix \"%s\".",
|
||||||
log_escape(mptmp, prefix), log_escape(mptmp, href));
|
log_escape(mptmp, prefix), log_escape(mptmp, href));
|
||||||
return -1;
|
return -1;
|
||||||
@@ -424,7 +424,7 @@ static int var_xml_generate(modsec_rec *msr, msre_var *var, msre_rule *rule,
|
|||||||
msre_var *rvar = NULL;
|
msre_var *rvar = NULL;
|
||||||
char *content = NULL;
|
char *content = NULL;
|
||||||
|
|
||||||
content = xmlNodeGetContent(nodes->nodeTab[i]);
|
content = (char *)xmlNodeGetContent(nodes->nodeTab[i]);
|
||||||
if (content != NULL) {
|
if (content != NULL) {
|
||||||
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
|
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
|
||||||
rvar->value = apr_pstrdup(mptmp, content);
|
rvar->value = apr_pstrdup(mptmp, content);
|
||||||
|
Reference in New Issue
Block a user