Bug 1404161 - remove unsound assertion in PK11_GetAttributes r=franziskus
authorDavid Keeler <dkeeler@mozilla.com>
Tue, 03 Oct 2017 19:36:23 +0200
changeset 13618 488c17f05a1ff5c9867c78af2708062c02c49ad8
parent 13617 ffe09c48221c90d66411834e7da1f852fd2af24a
child 13619 24729e83ed5c74caea7660d8884d0e448d584d5e
push id2398
push userfranziskuskiefer@gmail.com
push dateTue, 03 Oct 2017 17:41:18 +0000
reviewersfranziskus
bugs1404161
Bug 1404161 - remove unsound assertion in PK11_GetAttributes r=franziskus Differential Revision: https://phabricator.services.mozilla.com/D88
lib/pk11wrap/pk11obj.c
--- a/lib/pk11wrap/pk11obj.c
+++ b/lib/pk11wrap/pk11obj.c
@@ -196,17 +196,16 @@ PK11_HasAttributeSet(PK11SlotInfo *slot,
 CK_RV
 PK11_GetAttributes(PLArenaPool *arena, PK11SlotInfo *slot,
                    CK_OBJECT_HANDLE obj, CK_ATTRIBUTE *attr, int count)
 {
     int i;
     /* make pedantic happy... note that it's only used arena != NULL */
     void *mark = NULL;
     CK_RV crv;
-    PORT_Assert(slot->session != CK_INVALID_SESSION);
     if (slot->session == CK_INVALID_SESSION)
         return CKR_SESSION_HANDLE_INVALID;
 
     /*
      * first get all the lengths of the parameters.
      */
     PK11_EnterSlotMonitor(slot);
     crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, obj, attr, count);