Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
426:2706ef3e25a7 | 427:ac85ce87f539 |
---|---|
149 | 149 |
150 if(proxyuser) { | 150 if(proxyuser) { |
151 char *b; | 151 char *b; |
152 SOCKOUT("Proxy-Authorization: Basic "); | 152 SOCKOUT("Proxy-Authorization: Basic "); |
153 | 153 |
154 sprintf(buf, "%s:%s", proxyuser, proxypass); | 154 snprintf(buf, sizeof(buf), "%s:%s", proxyuser, proxypass); |
155 b = cw_base64_encode(buf); | 155 b = cw_base64_encode(buf); |
156 SOCKOUT(b); | 156 SOCKOUT(b); |
157 free(b); | 157 free(b); |
158 | 158 |
159 SOCKOUT("\r\n"); | 159 SOCKOUT("\r\n"); |