Revert "* mu-store: use strncpy instead of strcpy"

This reverts commit b2e9f43a05.
This commit is contained in:
Dirk-Jan C. Binnema 2011-07-16 10:22:21 +03:00
parent bdd3306dc1
commit 199c6c9bd9
1 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ add_terms_values_string (Xapian::Document& doc, MuMsg *msg,
/* try stack-allocation, it's much faster*/
len = strlen (orig);
val = (char*)(G_LIKELY(len < 1024)?g_alloca(len+1):g_malloc(len+1));
strncpy (val, orig, len);
strcpy (val, orig);
add_terms_values_str (doc, val, mfid);
@ -426,7 +426,7 @@ add_terms_values_string_list (Xapian::Document& doc, MuMsg *msg,
val = (char*)g_alloca(len+1);
else
val = (char*)g_malloc(len+1);
strncpy (val, (char*)lst->data, len);
strcpy (val, (char*)lst->data);
add_terms_values_str (doc, val, mfid);