History

Source and destination overlap in memcpy, cstr_cat (tccpp.c:322)

This code is from "Improve hash performance"

seyko committed 10 years ago

Commit 8db7a0f1 parent d25f67e1 file · +1 −1Browse files

Unified · Split

tccpp.c+1−1
@@ -319,7 +319,7 @@ ST_FUNC void cstr_cat(CString *cstr, const char *str, int len) · 318 unmodified lines
319319 size = cstr->size + len;
320320 if (size > cstr->size_allocated)
321321 cstr_realloc(cstr, size);
322− memcpy(((unsigned char *)cstr->data) + cstr->size, str, len);
322+ memmove(((unsigned char *)cstr->data) + cstr->size, str, len);
323323 cstr->size = size;
324324 }
325325

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t