Fixes potential buffer overrun
This commit is contained in:
parent
69de207c21
commit
f08985086a
|
@ -835,7 +835,7 @@ static void print_ssh_key(FILE *outf, const char * alg, struct sc_pkcs15_object
|
|||
return;
|
||||
|
||||
if (obj->label && strlen(obj->label))
|
||||
fprintf(outf,"ssh-%s %s %s\n", alg, uu, obj->label);
|
||||
fprintf(outf,"ssh-%s %s %.*s\n", alg, uu, sizeof obj->label, obj->label);
|
||||
else
|
||||
fprintf(outf,"ssh-%s %s\n", alg, uu);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue