mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
@@ -630,13 +630,18 @@ nextround:
|
||||
}
|
||||
|
||||
if(msr->stream_input_data != NULL && input_body == 1) {
|
||||
memset(msr->stream_input_data, 0x0, msr->stream_input_length);
|
||||
free(msr->stream_input_data);
|
||||
msr->stream_input_data = NULL;
|
||||
msr->stream_input_length = 0;
|
||||
#ifdef MSC_LARGE_STREAM_INPUT
|
||||
msr->stream_input_allocated_length = 0;
|
||||
#endif
|
||||
|
||||
msr->stream_input_data = (char *)malloc(size);
|
||||
#else
|
||||
msr->stream_input_data = (char *)malloc(size+1);
|
||||
#endif
|
||||
|
||||
if(msr->stream_input_data == NULL) {
|
||||
return -1;
|
||||
}
|
||||
@@ -644,11 +649,16 @@ nextround:
|
||||
msr->stream_input_length = size;
|
||||
#ifdef MSC_LARGE_STREAM_INPUT
|
||||
msr->stream_input_allocated_length = size;
|
||||
memset(msr->stream_input_data, 0x0, size);
|
||||
#else
|
||||
memset(msr->stream_input_data, 0x0, size+1);
|
||||
#endif
|
||||
msr->if_stream_changed = 1;
|
||||
|
||||
memcpy(msr->stream_input_data, data, size);
|
||||
#ifndef MSC_LARGE_STREAM_INPUT
|
||||
msr->stream_input_data[size] = '\0';
|
||||
#endif
|
||||
|
||||
var->value_len = size;
|
||||
var->value = msr->stream_input_data;
|
||||
|
Reference in New Issue
Block a user