From e95d64333a6726a9c339eca0e803881f6cfc9926 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Thu, 19 Mar 2015 15:57:22 -0500 Subject: [PATCH] Refs #519. Avoid calling strncpy. --- driver/others/dynamic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver/others/dynamic.c b/driver/others/dynamic.c index 87420938f..60b3c72af 100644 --- a/driver/others/dynamic.c +++ b/driver/others/dynamic.c @@ -363,7 +363,7 @@ static gotoblas_t *force_coretype(char *coretype){ int i ; int found = -1; char message[128]; - char mname[20]; + //char mname[20]; for ( i=1 ; i <= 21; i++) { @@ -375,8 +375,8 @@ static gotoblas_t *force_coretype(char *coretype){ } if (found < 0) { - strncpy(mname,coretype,20); - sprintf(message, "Core not found: %s\n",mname); + //strncpy(mname,coretype,20); + snprintf(message, 128, "Core not found: %s\n",coretype); openblas_warning(1, message); return(NULL); }