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
|
--- rc.c.orig Fri Jan 20 02:53:42 1995
+++ rc.c Sun Feb 10 14:28:42 2002
@@ -29,7 +29,7 @@
* is created.
*/
-KMAP *getcontext(name)
+KMAP *joegetcontext(name)
char *name;
{
struct context *c;
@@ -610,7 +610,8 @@
FILE *fd; /* rc file */
int line=0; /* Line number */
int err=0; /* Set to 1 if there was a syntax error */
- ossep(zcpy(buf,name));
+ strlcpy(buf,name,sizeof(buf));
+ ossep(buf);
#ifdef __MSDOS__
fd=fopen(buf,"rt");
#else
@@ -739,7 +740,7 @@
for(buf[x]=c;cwhite(buf[x]);++x);
for(c=x;!cwhitef(buf[c]);++c);
buf[c]=0;
- if(c!=x) kcpy(context,getcontext(buf+x));
+ if(c!=x) kcpy(context,joegetcontext(buf+x));
else
{
err=1;
@@ -788,7 +789,7 @@
err=1;
fprintf(stderr,"\n%s %d: No context selected for :delete",name,line);
}
- else context=getcontext(buf+1);
+ else context=joegetcontext(buf+1);
else
{
err=1;
|