Skip to content

Commit e95d643

Browse files
committed
Refs #519. Avoid calling strncpy.
1 parent 75c40bc commit e95d643

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

driver/others/dynamic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static gotoblas_t *force_coretype(char *coretype){
363363
int i ;
364364
int found = -1;
365365
char message[128];
366-
char mname[20];
366+
//char mname[20];
367367

368368
for ( i=1 ; i <= 21; i++)
369369
{
@@ -375,8 +375,8 @@ static gotoblas_t *force_coretype(char *coretype){
375375
}
376376
if (found < 0)
377377
{
378-
strncpy(mname,coretype,20);
379-
sprintf(message, "Core not found: %s\n",mname);
378+
//strncpy(mname,coretype,20);
379+
snprintf(message, 128, "Core not found: %s\n",coretype);
380380
openblas_warning(1, message);
381381
return(NULL);
382382
}

0 commit comments

Comments
 (0)