mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 03:44:22 -04:00
Replace (safe) use of strcpy with memcpy to appease OpenBSD
If Libevent uses strcpy, even safely, it seems OpenBSD's linker will complain every time a library links Libevent. It's easier just not to use the old thing, even when it's safe to do so.
This commit is contained in:
parent
75701e897b
commit
caca2f451c
6
http.c
6
http.c
@ -249,9 +249,9 @@ evhttp_htmlescape(const char *html)
|
||||
}
|
||||
for (i = 0; i < old_size; ++i) {
|
||||
const char *replaced = html_replace(html[i], scratch_space);
|
||||
/* this is length checked */
|
||||
strcpy(p, replaced);
|
||||
p += strlen(replaced);
|
||||
size_t len = strlen(replaced);
|
||||
memcpy(p, replaced, len);
|
||||
p += len;
|
||||
}
|
||||
|
||||
*p = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user