2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

[master] replace memcpy() with memmove().

3698.	[cleanup]	Replaced all uses of memcpy() with memmove().
			[RT #35120]
This commit is contained in:
Evan Hunt
2014-01-08 16:27:10 -08:00
parent bfb3305684
commit e851ea8260
126 changed files with 494 additions and 490 deletions

View File

@@ -702,7 +702,7 @@ create_string(cfg_parser_t *pctx, const char *contents, const cfg_type_t *type,
isc_mem_put(pctx->mctx, obj, sizeof(*obj));
return (ISC_R_NOMEMORY);
}
memcpy(obj->value.string.base, contents, len);
memmove(obj->value.string.base, contents, len);
obj->value.string.base[len] = '\0';
*ret = obj;
@@ -1638,7 +1638,7 @@ parse_token(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
goto cleanup;
}
obj->value.string.length = r.length;
memcpy(obj->value.string.base, r.base, r.length);
memmove(obj->value.string.base, r.base, r.length);
obj->value.string.base[r.length] = '\0';
*ret = obj;
return (result);