19 lines
540 B
Diff
19 lines
540 B
Diff
|
--- linklist.c.orig Sun Sep 4 07:40:09 2005
|
||
|
+++ linklist.c Sun Sep 4 07:42:19 2005
|
||
|
@@ -190,12 +190,12 @@
|
||
|
int add_glist(char *str, GLISTPTR *list)
|
||
|
{
|
||
|
GLISTPTR newptr,cptr,pptr;
|
||
|
- char temp_buf[256];
|
||
|
+ char temp_buf[LINKLIST_MAX_STRING];
|
||
|
char *name=temp_buf;
|
||
|
|
||
|
/* make local copy of string */
|
||
|
- strncpy(temp_buf,str,255);
|
||
|
- temp_buf[255]=0;
|
||
|
+ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1);
|
||
|
+ temp_buf[LINKLIST_MAX_STRING - 1]=0;
|
||
|
|
||
|
while (!isspace((int)*name)&&*name!=0) name++;
|
||
|
if (*name==0) name=temp_buf;
|