Mercurial > hg
diff mcabber/connwrap/connwrap.c @ 427:ac85ce87f539
Fix buffer overflow in cw_setproxy()
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 06 Sep 2005 21:49:27 +0200 |
parents | ec86d759ed54 |
children | 89aeb8fdd215 |
line wrap: on
line diff
--- a/mcabber/connwrap/connwrap.c Mon Sep 05 22:56:57 2005 +0200 +++ b/mcabber/connwrap/connwrap.c Tue Sep 06 21:49:27 2005 +0200 @@ -151,7 +151,7 @@ char *b; SOCKOUT("Proxy-Authorization: Basic "); - sprintf(buf, "%s:%s", proxyuser, proxypass); + snprintf(buf, sizeof(buf), "%s:%s", proxyuser, proxypass); b = cw_base64_encode(buf); SOCKOUT(b); free(b);