1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
$NetBSD: patch-al,v 1.1 2003/03/29 21:20:30 salo Exp $
Fixes potential remote buffer overflows. See the following url for more
details: http://securityfocus.com/archive/1/315057
Patch by caf@guarana.org.
--- source/numbers.c.orig 2002-02-28 05:22:50.000000000 +0100
+++ source/numbers.c 2003-03-29 21:56:55.000000000 +0100
@@ -354,26 +354,29 @@
set_display_target(chan, LOG_CURRENT);
PasteArgs(ArgList, 0);
- strcpy(buffer, ArgList[0]);
+ strlcpy(buffer, ArgList[0], sizeof buffer);
switch(-current_numeric)
{
case 437:
- strcat(buffer, " (Channel is temporarily unavailable)");
+ strlcat(buffer,
+ " (Channel is temporarily unavailable)",
+ sizeof buffer);
break;
case 471:
- strcat(buffer, " (Channel is full)");
+ strlcat(buffer, " (Channel is full)", sizeof buffer);
break;
case 473:
- strcat(buffer, " (You must be invited)");
+ strlcat(buffer, " (You must be invited)",
+ sizeof buffer);
break;
case 474:
- strcat(buffer, " (You are banned)");
+ strlcat(buffer, " (You are banned)", sizeof buffer);
break;
case 475:
- strcat(buffer, " (Bad channel key)");
+ strlcat(buffer, " (Bad channel key)", sizeof buffer);
break;
case 476:
- strcat(buffer, " (Bad channel mask)");
+ strlcat(buffer, " (Bad channel mask)", sizeof buffer);
break;
default:
return;
@@ -385,7 +388,6 @@
reset_display_target();
}
-
int handle_server_stats(char *from, char **ArgList, int comm)
{
static int norm = 0,
|