Remove the unneeded null termination for the stream_input_data

This commit is contained in:
Allan Boll 2017-08-22 15:32:52 -07:00 committed by Felipe Zimmerle
parent 023b863853
commit 6ce7f4d689
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -636,15 +636,15 @@ nextround:
msr->stream_input_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) {
return -1;
}
msr->stream_input_length = size;
msr->stream_input_allocated_length = size + 1;
memset(msr->stream_input_data, 0x0, size + 1);
msr->stream_input_allocated_length = size;
memset(msr->stream_input_data, 0x0, size);
msr->if_stream_changed = 1;