freebsd-ports/www/webalizer/files/linklist.geo.patch
Dirk Meyer 8f842d867f - add geolizer patches
(merge from www/geolizer)
Suggested by: Steve Clement, David Raison
Reviewed by:	Andrey Chernov
2005-09-04 15:46:50 +00:00

18 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;