mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Remove the unneeded null termination for the stream_input_data
This commit is contained in:
parent
023b863853
commit
6ce7f4d689
@ -636,15 +636,15 @@ nextround:
|
|||||||
msr->stream_input_length = 0;
|
msr->stream_input_length = 0;
|
||||||
msr->stream_input_allocated_length = 0;
|
msr->stream_input_allocated_length = 0;
|
||||||
|
|
||||||
msr->stream_input_data = (char *)malloc(size+1);
|
msr->stream_input_data = (char *)malloc(size);
|
||||||
|
|
||||||
if(msr->stream_input_data == NULL) {
|
if(msr->stream_input_data == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
msr->stream_input_length = size;
|
msr->stream_input_length = size;
|
||||||
msr->stream_input_allocated_length = size + 1;
|
msr->stream_input_allocated_length = size;
|
||||||
memset(msr->stream_input_data, 0x0, size + 1);
|
memset(msr->stream_input_data, 0x0, size);
|
||||||
|
|
||||||
msr->if_stream_changed = 1;
|
msr->if_stream_changed = 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user