From 40c4dff74d460624e3de1cc0d49ce6df3ccce613 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Mon, 20 Apr 2009 17:28:48 +0000 Subject: * Fixed safestrncpy trashing the memory before dst when n == 0. (since r10667, bugreport:2996) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13681 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/strlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/strlib.h') diff --git a/src/common/strlib.h b/src/common/strlib.h index 1ba26ca4c..42034e4c1 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -31,7 +31,7 @@ size_t strnlen (const char* string, size_t maxlen); int e_mail_check(char* email); int config_switch(const char* str); -/// always nul-terminates the string +/// strncpy that always nul-terminates the string char* safestrncpy(char* dst, const char* src, size_t n); /// doesn't crash on null pointer -- cgit v1.2.3-60-g2f50