You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/02/12 19:12:36 UTC
[lucy-commits] svn commit: r1070119 - /incubator/lucy/trunk/clownfish/src/CFCParcel.c
Author: marvin
Date: Sat Feb 12 18:12:36 2011
New Revision: 1070119
URL: http://svn.apache.org/viewvc?rev=1070119&view=rev
Log:
Fix an off-by-one/null-termination error in Clownfish::Parcel.
Modified:
incubator/lucy/trunk/clownfish/src/CFCParcel.c
Modified: incubator/lucy/trunk/clownfish/src/CFCParcel.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCParcel.c?rev=1070119&r1=1070118&r2=1070119&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCParcel.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCParcel.c Sat Feb 12 18:12:36 2011
@@ -130,6 +130,10 @@ CFCParcel_init(CFCParcel *self, const ch
memcpy(self->Prefix, self->cnick, cnick_len);
if (cnick_len) {
self->Prefix[cnick_len] = '_';
+ self->Prefix[cnick_len + 1] = '\0';
+ }
+ else {
+ self->Prefix[cnick_len] = '\0';
}
size_t i;
for (i = 0; i < amount; i++) {