set_cka_label(): remove a possibly invalid memory access

See
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013990.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4245 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2010-04-17 18:51:34 +00:00
parent d10effd58c
commit 7a0578c670
1 changed files with 0 additions and 2 deletions

View File

@ -233,8 +233,6 @@ set_cka_label(CK_ATTRIBUTE_PTR attr, char *label)
char *l = (char *)attr->pValue;
int len = attr->ulValueLen;
if (l[len] == '\0')
return l;
if (len >= SC_PKCS15_MAX_LABEL_SIZE)
len = SC_PKCS15_MAX_LABEL_SIZE-1;
memcpy(label, l, len);