$NetBSD: patch-ae,v 1.3 2005/10/06 15:14:40 ghen Exp $ --- src/ftpsearch.c.orig 2001-08-18 01:38:28.000000000 +0200 +++ src/ftpsearch.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -94,7 +93,7 @@ char *get_string_ahref(char *buf, char * p3 = find_closed_a(p2); assert(p3 != NULL); - strncpy(out, p2 + 1, p3 - p2 - 1); + strncpy(out, p2 + 1, (p3 - p2 - 1 > 1024) ? 1024 : p3 - p2 - 1); out[p3 - p2 - 1] = 0; return p3;