From d6accce1073719d6821245fd0baa935ac12e6dd2 Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Sun, 27 Jan 2002 06:39:45 +0000 Subject: [PATCH] * file_ops.c: fixed bug in cmd_read() which could cause server to report the wrong number of bytes for the client to download --- citadel/ChangeLog | 5 +++++ citadel/file_ops.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 5f1cf4d7e..81f25561e 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 590.94 2002/01/27 06:39:45 error + * file_ops.c: fixed bug in cmd_read() which could cause server to report + the wrong number of bytes for the client to download + Revision 590.93 2002/01/26 21:33:38 ajc * More internet addressing and global directory stuff. I think it's all working now except for the purging of old entries. @@ -3263,3 +3267,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/file_ops.c b/citadel/file_ops.c index 1d1e8705d..5d8a78728 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -699,7 +699,7 @@ void cmd_read(char *cmdbuf) } fseek(CC->download_fp, start_pos, 0); - fread(buf, bytes, 1, CC->download_fp); + bytes = fread(buf, bytes, 1, CC->download_fp); cprintf("%d %d\n", BINARY_FOLLOWS, bytes); client_write(buf, bytes); } -- 2.30.2