Mercurial > pidgin
diff src/protocols/jabber/jabber.c @ 3234:6a96436a542a
[gaim-migrate @ 3251]
Whacked buffer overflow bug in gjab_recv(). Thanks to rwscott.
committer: Tailor Script <tailor@pidgin.im>
author | Jim Seymour <jseymour> |
---|---|
date | Wed, 08 May 2002 00:50:22 +0000 |
parents | 20612da83d8c |
children | 6796fdeed022 |
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c Wed May 08 00:21:26 2002 +0000 +++ b/src/protocols/jabber/jabber.c Wed May 08 00:50:22 2002 +0000 @@ -401,7 +401,7 @@ if (!gjc || gjc->state == JCONN_STATE_OFF) return; - if ((len = read(gjc->fd, buf, sizeof(buf))) > 0) { + if ((len = read(gjc->fd, buf, sizeof(buf) - 1)) > 0) { struct jabber_data *jd = GJ_GC(gjc)->proto_data; buf[len] = '\0'; debug_printf("input (len %d): %s\n", len, buf);