write_data_to_repo
diff --git a/nlsr_sync.c b/nlsr_sync.c
index 65caed2..c1263b4 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -261,9 +261,8 @@
length = resultbuf->length;
if (content_only){
ccn_content_get_value(ptr, length, &pcobuf, &ptr, &length);
- *content_data = (unsigned char *) calloc(length+1, sizeof(char *));
+ *content_data = (unsigned char *) calloc(length, sizeof(char *));
memcpy (*content_data, ptr, length);
- *content_data[strlen((char *)*content_data)]='\0';
}
}
ccn_charbuf_destroy(&resultbuf);