fixed copy into fixed size buffer
This commit is contained in:
parent
b6a935a261
commit
fdd38f6e04
|
@ -261,7 +261,7 @@ static int insert_pin(
|
|||
static char *dirpath(char *dir, const char *path){
|
||||
static char buf[SC_MAX_PATH_STRING_SIZE];
|
||||
|
||||
strcpy(buf,dir);
|
||||
strlcpy(buf,dir,sizeof buf);
|
||||
strlcat(buf,path,sizeof buf);
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ sc_pkcs15init_bind(struct sc_card *card, const char *name, const char *profile_o
|
|||
* If none is defined, use the default profile name.
|
||||
*/
|
||||
if (!get_profile_from_config(card, card_profile, sizeof(card_profile)))
|
||||
strcpy(card_profile, driver);
|
||||
strclpy(card_profile, driver, sizeof card_profile);
|
||||
if (profile_option != NULL)
|
||||
strlcpy(card_profile, profile_option, sizeof(card_profile));
|
||||
|
||||
|
|
Loading…
Reference in New Issue