8f6ed5b4c9
ok benoit@
24 lines
932 B
Plaintext
24 lines
932 B
Plaintext
$OpenBSD: patch-linklist_c,v 1.3 2011/01/05 08:19:18 giovanni Exp $
|
|
--- linklist.c.orig Mon Oct 4 19:30:36 2010
|
|
+++ linklist.c Mon Jan 3 11:30:14 2011
|
|
@@ -109,7 +109,7 @@ NLISTPTR new_nlist(char *str)
|
|
fprintf(stderr,"[new_nlist] %s\n",msg_big_one);
|
|
}
|
|
if (( newptr = malloc(sizeof(struct nlist))) != NULL)
|
|
- {strncpy(newptr->string, str, sizeof(newptr->string));newptr->next=NULL;}
|
|
+ {strlcpy(newptr->string, str, sizeof(newptr->string));newptr->next=NULL;}
|
|
return newptr;
|
|
}
|
|
|
|
@@ -167,8 +167,8 @@ GLISTPTR new_glist(char *str, char *name)
|
|
}
|
|
if (( newptr = malloc(sizeof(struct glist))) != NULL)
|
|
{
|
|
- strncpy(newptr->string, str, sizeof(newptr->string));
|
|
- strncpy(newptr->name, name, sizeof(newptr->name));
|
|
+ strlcpy(newptr->string, str, sizeof(newptr->string));
|
|
+ strlcpy(newptr->name, name, sizeof(newptr->name));
|
|
newptr->next=NULL;
|
|
}
|
|
return newptr;
|