Closed dhopkalo closed 6 years ago
Hello,
char * meminfo_escape_for_json(const char *s) { int new_str_len; char *s1; s1 = php_str_to_str(s, strlen(s), "\\", 1, "\\\\", 2, &new_str_len); return php_str_to_str(s1, strlen(s1), "\"", 1, "\\\"", 2, &new_str_len); }
php_str_to_str allocates a new char * in memory that doesn't clear after.
pls see my tests that determine this problem:
and my solution to it
Thanks.
Thanks, your solution has been merged and applied at other places too ;)
Hello,
php_str_to_str allocates a new char * in memory that doesn't clear after.
pls see my tests that determine this problem:
27
and my solution to it
28
Thanks.