projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a74b69
)
fix
author
Christian Grothoff
<christian@grothoff.org>
Fri, 7 May 2010 09:19:18 +0000
(09:19 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Fri, 7 May 2010 09:19:18 +0000
(09:19 +0000)
src/fs/fs.c
patch
|
blob
|
history
diff --git
a/src/fs/fs.c
b/src/fs/fs.c
index a569ce27a57b7878d97b19e2309aef4377f500eb..d2ac711f2ba949c41bb69d1fd797e9ddbffb57dd 100644
(file)
--- a/
src/fs/fs.c
+++ b/
src/fs/fs.c
@@
-1097,14
+1097,16
@@
copy_from_reader (struct GNUNET_BIO_WriteHandle *wh,
char buf[32 * 1024];
uint64_t off;
size_t ret;
+ size_t left;
char *emsg;
emsg = NULL;
off = 0;
while (off < fi->data.file.file_size)
{
+ left = GNUNET_MIN (sizeof(buf), fi->data.file.file_size - off);
ret = fi->data.file.reader (fi->data.file.reader_cls,
- off,
sizeof (buf)
,
+ off,
left
,
buf,
&emsg);
if (ret == 0)