]>
Commit | Line | Data |
---|---|---|
ff329d4f JB |
1 | --- cvs-nserver-1.11.1.52/src/server.c.orig Sat Mar 23 01:33:45 2002 |
2 | +++ cvs-nserver-1.11.1.52/src/server.c Tue Mar 11 20:53:37 2003 | |
3 | @@ -5009,7 +5009,7 @@ | |
4 | /* Now initialize our argument vector (for arguments from the client). */ | |
5 | ||
6 | /* Small for testing. */ | |
7 | - argument_vector_size = 1; | |
8 | + argument_vector_size = 2; | |
9 | argument_vector = | |
10 | (char **) malloc (argument_vector_size * sizeof (char *)); | |
11 | if (argument_vector == NULL) | |
12 | @@ -5044,6 +5044,9 @@ | |
13 | say something like "client apparently supports an option not supported | |
14 | by this server" or something like that instead of usage message. */ | |
15 | argument_vector[0] = "cvs server"; | |
16 | + argument_vector[1] = NULL; | |
17 | + /* first, null terminate; | |
18 | + * second, serve_argument writes outside bounds if argumentvector_size<2 */ | |
19 | ||
20 | while (1) | |
21 | { | |
22 | --- cvs-nserver-1.11.1.52/acl/dir-acl.c.orig Sun Mar 31 22:23:38 2002 | |
23 | +++ cvs-nserver-1.11.1.52/acl/dir-acl.c Tue Mar 11 21:01:41 2003 | |
24 | @@ -102,7 +102,7 @@ | |
25 | /* reallocate if needed */ | |
26 | if (dirs_count + 1 >= dirs_allocated) { | |
27 | struct DIR_ACL **new_top_dirs = | |
28 | - realloc(top_dirs, dirs_allocated + ALLOC_DELTA); | |
29 | + realloc(top_dirs, (dirs_allocated + ALLOC_DELTA) * sizeof(DIR_ACL*)); | |
30 | ||
31 | if (new_top_dirs == NULL) | |
32 | return 0; | |
33 | --- cvs-nserver-1.11.1.52/src/main.c.orig Sun Mar 31 22:49:08 2002 | |
34 | +++ cvs-nserver-1.11.1.52/src/main.c Tue Mar 11 21:11:38 2003 | |
35 | @@ -922,6 +922,13 @@ | |
36 | #ifdef SERVER_SUPPORT | |
37 | /* ACL-related stuff */ | |
38 | if (server_active) { | |
39 | + if(!Pserver_Repos) { | |
40 | + printf("E No repository specified.\n"); | |
41 | +#ifdef SYSTEM_CLEANUP | |
42 | + SYSTEM_CLEANUP (); | |
43 | +#endif | |
44 | + exit(EXIT_FAILURE); | |
45 | + } | |
46 | set_repository(); | |
47 | load_cvsgroups(); | |
48 | load_acladmins(); | |
eca21adf JB |
49 | --- cvs-nserver-1.11.1.52/acl/stringbuf.c.orig 2002-01-19 18:33:05.000000000 +0100 |
50 | +++ cvs-nserver-1.11.1.52/acl/stringbuf.c 2005-02-19 00:25:08.200786152 +0100 | |
51 | @@ -119,7 +119,7 @@ | |
52 | if (len == 0) | |
53 | return buf; | |
54 | ||
55 | - if (buf->len + len > buf->allocated) { | |
56 | + if (buf->len + len >= buf->allocated) { | |
57 | size_t needs_to_allocate = buf->allocated + len * 2 + 1; | |
58 | char *tmp = (char *) realloc(buf->buf, needs_to_allocate); | |
59 | if (tmp == NULL) |