diff options
author | Shivaram Lingamneni <slingamn@cs.stanford.edu> | 2017-10-24 14:12:05 -0400 |
---|---|---|
committer | Shivaram Lingamneni <slingamn@cs.stanford.edu> | 2017-10-24 14:12:05 -0400 |
commit | a7632f62255ff67c802742c0d0a2270adfa12228 (patch) | |
tree | e24c641b8d3de7a186622914ea211ce8ad292767 | |
parent | 0d13ab702285c3e8a2abb2ec81f10bbb79c905a6 (diff) | |
download | pidgin-a7632f62255ff67c802742c0d0a2270adfa12228.tar.gz |
review fix: do the maximum allowable read each time
-rw-r--r-- | libpurple/protocols/irc/irc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c index 70ed351921..133c4d1aa0 100644 --- a/libpurple/protocols/irc/irc.c +++ b/libpurple/protocols/irc/irc.c @@ -698,7 +698,7 @@ static void irc_input_cb_ssl(gpointer data, PurpleSslConnection *gsc, } } - len = purple_ssl_read(gsc, irc->inbuf + irc->inbufused, IRC_BUFSIZE_INCREMENT - 1); + len = purple_ssl_read(gsc, irc->inbuf + irc->inbufused, irc->inbuflen - irc->inbufused - 1); if (len > 0) { read_input(irc, len); } @@ -735,7 +735,7 @@ static void irc_input_cb(gpointer data, gint source, PurpleInputCondition cond) } } - len = read(irc->fd, irc->inbuf + irc->inbufused, IRC_BUFSIZE_INCREMENT - 1); + len = read(irc->fd, irc->inbuf + irc->inbufused, irc->inbuflen - irc->inbufused - 1); if (len < 0 && errno == EAGAIN) { return; |