Fixes potential buffer overrun

This commit is contained in:
Frank Morgner 2015-09-17 20:59:01 +02:00
parent 69de207c21
commit f08985086a
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}