Change a memcpy that should be a memmove within json_pointer_get, and fix memory leaks in of one the json_pointer tests.

This commit is contained in:
Eric Haszlakiewicz
2016-12-18 14:33:41 -05:00
parent 779b77a164
commit 0a010a59eb
2 changed files with 11 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ static void string_replace_all_occurrences_with_char(char *s, const char *occur,
*p = repl_char;
p++;
slen -= skip;
memcpy(p, (p + skip), slen - (p - s) + 1); /* includes null char too */
memmove(p, (p + skip), slen - (p - s) + 1); /* includes null char too */
}
}