Bugzilla – Attachment 1851 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]
Patch to fix xmalloc error when using pkcs11 for auth
openssh-pkcs11-xmallocfix.diff (text/plain), 873 bytes, created by
Matt Robinson
on 2010-06-03 05:40:31 AEST
(
hide
)
Description:
Patch to fix xmalloc error when using pkcs11 for auth
Filename:
MIME Type:
Creator:
Matt Robinson
Created:
2010-06-03 05:40:31 AEST
Size:
873 bytes
patch
obsolete
>? openssh-pkcs11-xmallocfix.diff >Index: ssh-pkcs11.c >=================================================================== >RCS file: /cvs/openssh/ssh-pkcs11.c,v >retrieving revision 1.6 >diff -u -p -r1.6 ssh-pkcs11.c >--- ssh-pkcs11.c 16 Apr 2010 05:54:44 -0000 1.6 >+++ ssh-pkcs11.c 2 Jun 2010 17:48:28 -0000 >@@ -433,7 +433,13 @@ pkcs11_fetch_keys(struct pkcs11_provider > error("C_GetAttributeValue failed: %lu", rv); > continue; > } >- /* allocate buffers for attributes, XXX check ulValueLen? */ >+ /* check that none of the attributes are zero length */ >+ if (attribs[0].ulValueLen == 0 || >+ attribs[1].ulValueLen == 0 || >+ attribs[2].ulValueLen == 0) { >+ continue; >+ } >+ /* allocate buffers for attributes */ > for (i = 0; i < 3; i++) > attribs[i].pValue = xmalloc(attribs[i].ulValueLen); > /* retrieve ID, modulus and public exponent of RSA key */
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