Debian Codegraph @

debian/patches/sprintf_overflow

raw
1 --- a/readcfg.c
2 +++ b/readcfg.c
3 @@ -2034,7 +2034,7 @@ static char *describe_addrtype(addrtype
4 #ifdef BW_LIM
5 char *describe_rate(long rate)
6 {
7 - static char buf[12];
8 + static char buf[20];
9 int c;
10 if (rate == 0) return "-";
11 else if (rate < 0) c = sprintf(buf, "%ld%%", -rate);
12 --- a/client.c
13 +++ b/client.c
14 @@ -369,7 +369,7 @@ static int call0 (FTN_NODE *node, BINKD_
15 if (use_proxy)
16 {
17 char *sp, *sport;
18 - strncpy(host, proxy[0] ? proxy : socks, sizeof(host));
19 + strncpy(host, proxy[0] ? proxy : socks, sizeof(host) - 1);
20 if ((sp=strchr(host, ':')) != NULL)
21 {
22 *sp++ = '\0';