diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2016-12-18 14:33:41 -0500 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2016-12-18 14:33:41 -0500 |
commit | 0a010a59eb9a93da5bb64cd5ba1c69f86ae3f099 (patch) | |
tree | b8db12eaf7280e392fc1b8477566a9992c87e8e8 /json_pointer.c | |
parent | 779b77a164287fc2cd23d05f1c3a46a27bab4111 (diff) | |
download | json-c-0a010a59eb9a93da5bb64cd5ba1c69f86ae3f099.tar.gz |
Change a memcpy that should be a memmove within json_pointer_get, and fix memory leaks in of one the json_pointer tests.
Diffstat (limited to 'json_pointer.c')
-rw-r--r-- | json_pointer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json_pointer.c b/json_pointer.c index 3648f8d..380d6e5 100644 --- a/json_pointer.c +++ b/json_pointer.c @@ -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 */ } } |