Mercurial > pidgin
changeset 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 | 96e215745dc0 |
children | 59cad0db9a6b |
files | src/protocols/jabber/jabber.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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);