-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: strlen related variables should be of type size_t #3503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2/master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -300,7 +300,8 @@ static void sanitize_request_line(modsec_rec *msr) { | |||||
| if (strcmp(arg->origin, "QUERY_STRING") == 0) { | ||||||
| char *pat = NULL; | ||||||
| char *p; | ||||||
| int j, arg_min, arg_max; | ||||||
| size_t j; | ||||||
| int arg_min, arg_max; | ||||||
|
|
||||||
| /* Go to the beginning of the parameter. */ | ||||||
| p = qspos; | ||||||
|
|
@@ -333,7 +334,7 @@ static void sanitize_request_line(modsec_rec *msr) { | |||||
| arg_max = 1; | ||||||
| while((*pat != '\0')&&(j--)) { | ||||||
| if(arg_max > mparm->pad_2) { | ||||||
| int off = (strlen(mparm->value) - arg_max); | ||||||
| size_t off = (strlen(mparm->value) - arg_max); | ||||||
| int pos = (mparm->pad_1-1); | ||||||
| if(off > pos) { | ||||||
| *pat = '*'; | ||||||
|
||||||
|
|
@@ -668,7 +669,8 @@ void sec_audit_logger_json(modsec_rec *msr) { | |||||
| int wrote_response_body = 0; | ||||||
| char *entry_filename, *entry_basename; | ||||||
| apr_status_t rc; | ||||||
| int i, limit, k, sanitized_partial, j; | ||||||
| int i, limit, k, sanitized_partial; | ||||||
| size_t j; | ||||||
| char *buf = NULL, *pat = NULL; | ||||||
| msc_parm *mparm = NULL; | ||||||
| int arg_min, arg_max, sanitize_matched; | ||||||
|
|
@@ -827,7 +829,7 @@ void sec_audit_logger_json(modsec_rec *msr) { | |||||
| arg_max = 1; | ||||||
| while((*pat != '\0')&&(j--)) { | ||||||
| if(arg_max > mparm->pad_2) { | ||||||
| int off = strlen(mparm->value) - arg_max; | ||||||
| size_t off = strlen(mparm->value) - arg_max; | ||||||
|
||||||
| size_t off = strlen(mparm->value) - arg_max; | |
| int off = (int)strlen(mparm->value) - arg_max; |
Uh oh!
There was an error while loading. Please reload this page.