mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 07:29:07 +08:00
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:
@@ -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 */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user