From 3545d572eecff2a6e0ad53bfae3ed0c35f232cbe Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 20 Jan 2011 16:34:59 -0800 Subject: [PATCH] Fix off-by-one error in the BlueSky simple storage backend. One extra byte of data was being included into the data returned, leading to data corruption. Fix this. --- bluesky/store-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluesky/store-simple.c b/bluesky/store-simple.c index ef68e11..25eef53 100644 --- a/bluesky/store-simple.c +++ b/bluesky/store-simple.c @@ -143,7 +143,7 @@ static void simplestore_task(gpointer a, gpointer b) char *data = g_malloc(result); if (strchr(result_buf, '\n') != NULL) { - int header_size = strchr(result_buf, '\n') - result_buf; + int header_size = strchr(result_buf, '\n') - result_buf + 1; int data_bytes = bytes - header_size; if (data_bytes > result) data_bytes = result; -- 2.20.1