From 3ebceeece2204d3755df1f1cc8210f7e97b6daad Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 16 Nov 2010 22:00:29 +0300 Subject: Make own strlcpy that does not calculate remaining string length (faster and more safe) Allow only ASCII symbols in logs, escape control chars --- src/evdns/evdns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/evdns') diff --git a/src/evdns/evdns.c b/src/evdns/evdns.c index 5401104b5..ce7c0b429 100644 --- a/src/evdns/evdns.c +++ b/src/evdns/evdns.c @@ -2474,7 +2474,7 @@ request_new(struct evdns_base *base, int type, const char *name, int flags, if (base->global_randomize_case) { unsigned i; char randbits[(sizeof(namebuf)+7)/8]; - g_strlcpy(namebuf, name, sizeof(namebuf)); + rspamd_strlcpy(namebuf, name, sizeof(namebuf)); rand_bytes_function(randbits, (name_len+7)/8); for (i = 0; i < name_len; ++i) { if (g_ascii_isalpha(namebuf[i])) { -- cgit v1.2.3