edc_parser: Fix to allocate correct size of memory for string.
Allocate one more char memory for the last null character of the string.
This commit fixes the commit 335575eb84
.
This commit is contained in:
parent
3fb96ced83
commit
0c15bde219
|
@ -95,7 +95,8 @@ double_quotation_marks_remove(const char *str)
|
|||
}
|
||||
|
||||
new_len = len - cnt;
|
||||
new_str = (char *) calloc(new_len * sizeof(char), 1);
|
||||
//Allocate one more char for last null character
|
||||
new_str = (char *) calloc((new_len + 1) * sizeof(char), 1);
|
||||
j = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue