# HG changeset patch # User Eric Warmenhoven # Date 992139519 0 # Node ID 03bebfa8247febbdaf6651d955acae9f8b5457b0 # Parent 7739e648a28a5b9c3675d6097e580ca4e3c5a680 [gaim-migrate @ 1992] read can return < 0 so you have to check for that case too committer: Tailor Script diff -r 7739e648a28a -r 03bebfa8247f plugins/msn/msn.c --- a/plugins/msn/msn.c Sun Jun 10 00:45:43 2001 +0000 +++ b/plugins/msn/msn.c Sun Jun 10 02:18:39 2001 +0000 @@ -146,9 +146,7 @@ static char *url_encode(unsigned char *text, int dospace) { static char newtext[MSN_BUF_LEN*2]; - char *buf; char *temp = (char *)malloc(4); - int c = 0; int i = 0; int j = 0; @@ -382,7 +380,7 @@ bzero(buf, MSN_BUF_LEN); do { - if (!read(source, buf + i, 1)) { + if (read(source, buf + i, 1) != 1) { free_msn_conn(mc); return; } @@ -450,7 +448,7 @@ bzero(buf, MSN_BUF_LEN); do { - if (!read(source, buf + i, 1)) { + if (read(source, buf + i, 1) != 1) { if (md->fd == source) { hide_login_progress(gc, "Read error"); signoff(gc); @@ -768,7 +766,7 @@ bzero(buf, MSN_BUF_LEN); do { - if (!read(source, buf + i, 1)) { + if (read(source, buf + i, 1) != 1) { hide_login_progress(gc, "Read error"); signoff(gc); return;