ignore non-matching function signature
use strlcpy(3) instead of strcpy(3)

Index: src/module.c
--- src/module.c.orig
+++ src/module.c
@@ -324,7 +324,8 @@ static void append_fields( char **p, hl_type *t ) {
 #define DISABLED_LIB_PTR ((void*)(int_val)2)
 
 static void *resolve_library( const char *lib, bool is_opt ) {
-	char tmp[256];
+	size_t tmplen = 256;
+	char tmp[tmplen];
 	void *h;
 
 #	ifndef HL_CONSOLE
@@ -359,15 +360,15 @@ static void *resolve_library( const char *lib, bool is
 #	endif
 	}
 
-	strcpy(tmp,lib);
+	strlcpy(tmp,lib,tmplen);
 
 #	ifdef HL_64
-	strcpy(tmp+strlen(lib),"64.hdll");
+	strlcpy(tmp+strlen(lib),"64.hdll",tmplen - strlen(lib));
 	h = dlopen(tmp,RTLD_LAZY);
 	if( h != NULL ) return h;
 #	endif
 
-	strcpy(tmp+strlen(lib),".hdll");
+	strlcpy(tmp+strlen(lib),".hdll",tmplen - strlen(lib));
 	h = dlopen(tmp,RTLD_LAZY);
 	if( h == NULL && !is_opt )
 		hl_fatal1("Failed to load library %s",tmp);
@@ -534,7 +535,8 @@ h_bool hl_module_init_vtune( hl_module *m ) {
 #endif
 
 static void hl_module_init_natives( hl_module *m ) {
-	char tmp[256];
+	size_t tmplen = 256;
+	char tmp[tmplen];
 	int i;
 	void *libHandler = NULL;
 	const char *curlib = NULL, *sign;
@@ -553,9 +555,9 @@ static void hl_module_init_natives( hl_module *m ) {
 			m->functions_ptrs[n->findex] = disabled_primitive;
 			continue;
 		}
-		strcpy(p,"hlp_");
+		strlcpy(p,"hlp_", tmplen);
 		p += 4;
-		strcpy(p,n->name);
+		strlcpy(p,n->name, tmplen);
 		p += strlen(n->name);
 		*p++ = 0;
 		f = dlsym(libHandler,tmp);
@@ -570,8 +572,10 @@ static void hl_module_init_natives( hl_module *m ) {
 		p = tmp;
 		append_type(&p,n->t);
 		*p++ = 0;
+		/*  ** Ignore non-matching function signature **
 		if( sign && memcmp(sign,tmp,strlen(sign)+1) != 0 )
 			hl_fatal4("Invalid signature for function %s@%s : %s required but %s found in hdll",n->lib,n->name,tmp,sign);
+		*/
 	}
 }
 
