mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-15 05:20:06 +08:00
Source and destination overlap in memcpy, cstr_cat (tccpp.c:322)
This code is from "Improve hash performance"
This commit is contained in:
parent
d25f67ec12
commit
8db7a0f7af
2
tccpp.c
2
tccpp.c
@ -319,7 +319,7 @@ ST_FUNC void cstr_cat(CString *cstr, const char *str, int len)
|
||||
size = cstr->size + len;
|
||||
if (size > cstr->size_allocated)
|
||||
cstr_realloc(cstr, size);
|
||||
memcpy(((unsigned char *)cstr->data) + cstr->size, str, len);
|
||||
memmove(((unsigned char *)cstr->data) + cstr->size, str, len);
|
||||
cstr->size = size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user