X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fhash.c;h=820c8f684adcd1ebf85969718b6c277d78850aa6;hb=15e4f674021ce2070a94c376d9a87acf0c824ae2;hp=59cba404ab5edbebb23bee3b8f7826c96f83251f;hpb=9353a4a9cb47673f83ac06d42a475838e753ff73;p=ngircd-alex.git diff --git a/src/ngircd/hash.c b/src/ngircd/hash.c index 59cba404..820c8f68 100644 --- a/src/ngircd/hash.c +++ b/src/ngircd/hash.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: hash.c,v 1.8 2002/12/26 13:16:54 alex Exp $"; +static char UNUSED id[] = "$Id: hash.c,v 1.9 2002/12/26 16:25:43 alex Exp $"; #include "imp.h" #include @@ -38,9 +38,7 @@ Hash( CHAR *String ) CHAR buffer[LINE_LEN]; - strncpy( buffer, String, LINE_LEN - 1 ); - buffer[LINE_LEN - 1] = '\0'; - + strlcpy( buffer, String, sizeof( buffer )); return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 ); } /* Hash */