Bugzilla – Attachment 2714 Details for
Bug 1773
PKCS#11 authentication fails with "xmalloc: zero size" for some certificates.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Avoid xmalloc(0)
bz1773.diff (text/plain), 671 bytes, created by
Damien Miller
on 2015-09-24 16:26:18 AEST
(
hide
)
Description:
Avoid xmalloc(0)
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2015-09-24 16:26:18 AEST
Size:
671 bytes
patch
obsolete
>diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c >index 92614a5..67ac1f5 100644 >--- a/ssh-pkcs11.c >+++ b/ssh-pkcs11.c >@@ -322,8 +322,10 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx, > k11->slotidx = slotidx; > /* identify key object on smartcard */ > k11->keyid_len = keyid_attrib->ulValueLen; >- k11->keyid = xmalloc(k11->keyid_len); >- memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len); >+ if (k11->keyid_len > 0) { >+ k11->keyid = xmalloc(k11->keyid_len); >+ memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len); >+ } > k11->orig_finish = def->finish; > memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method)); > k11->rsa_method.name = "pkcs11";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1773
:
1851
|
2713
| 2714