projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c552180
)
Fix off-by-one error in the BlueSky simple storage backend.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 21 Jan 2011 00:34:59 +0000
(16:34 -0800)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 21 Jan 2011 00:34:59 +0000
(16:34 -0800)
One extra byte of data was being included into the data returned, leading
to data corruption. Fix this.
bluesky/store-simple.c
patch
|
blob
|
history
diff --git
a/bluesky/store-simple.c
b/bluesky/store-simple.c
index
ef68e11
..
25eef53
100644
(file)
--- 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;