/pidgin/main: 6a8f7f4ec06f: Fix bug in purple_xfer_read_file()
Jakub Adam
jakub.adam at ktknet.cz
Sun Nov 23 23:22:57 EST 2014
Changeset: 6a8f7f4ec06f71f87b851b391f855470e2dbadde
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date: 2014-10-23 17:56 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/6a8f7f4ec06f
Description:
Fix bug in purple_xfer_read_file()
This was introduced in 499ffff1e77c and for purple_xfer_write_file()
fixed in 2b7c4c034594. File reading was for sure also affected since the
subsequent calculation of sent bytes and function's return value are
completely wrong.
Refs #16315
diffstat:
libpurple/xfer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff --git a/libpurple/xfer.c b/libpurple/xfer.c
--- a/libpurple/xfer.c
+++ b/libpurple/xfer.c
@@ -1318,7 +1318,7 @@ purple_xfer_read_file(PurpleXfer *xfer,
purple_xfer_cancel_local(xfer);
return -1;
}
- got_len = fread(buffer, size, 1, priv->dest_fp);
+ got_len = fread(buffer, 1, size, priv->dest_fp);
if ((got_len < 0 || (gsize)got_len != size) &&
ferror(priv->dest_fp))
{
More information about the Commits
mailing list