From e199949219ae0d3c400dccf14e052bc4e4f84b91 Mon Sep 17 00:00:00 2001 From: Hyoyoung Chang Date: Mon, 28 Feb 2011 15:34:56 +0900 Subject: [PATCH] change content buff copying method --- src/xcnphandler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xcnphandler.c b/src/xcnphandler.c index 3f0fcf5..fe9b483 100755 --- a/src/xcnphandler.c +++ b/src/xcnphandler.c @@ -125,7 +125,8 @@ int add_to_storage_buffer(void *data, char *src, int len) g_history_pos = 0; // FIXME: remove g_lasteset_content - memcpy(g_lastest_content, src, len); + strncpy(g_lastest_content, src, len); + //memcpy(g_lastest_content, src, len); g_lastest_content[len] = '\0'; adding_item_to_storage(ad, g_history_pos, g_lastest_content); increment_current_history_position(); -- 2.7.4