Blame SOURCES/coolkey-cac-1.patch

ed074c
diff -up ./src/coolkey/object.cpp.cac-1 ./src/coolkey/object.cpp
ed074c
--- ./src/coolkey/object.cpp.cac-1	2010-06-23 04:46:35.726198827 -0700
ed074c
+++ ./src/coolkey/object.cpp	2010-06-23 04:47:28.073827862 -0700
ed074c
@@ -505,6 +505,10 @@ dataStart(const CKYByte *buf, unsigned i
ed074c
     unsigned char tag;
ed074c
     unsigned int used_length= 0;
ed074c
 
ed074c
+    if(!buf) {
ed074c
+        return NULL;
ed074c
+    }
ed074c
+
ed074c
     tag = buf[used_length++];
ed074c
 
ed074c
     /* blow out when we come to the end */
ed074c
diff -up ./src/coolkey/slot.cpp.cac-1 ./src/coolkey/slot.cpp
ed074c
--- ./src/coolkey/slot.cpp.cac-1	2010-06-23 04:46:22.718371631 -0700
ed074c
+++ ./src/coolkey/slot.cpp	2010-06-23 04:57:04.417774402 -0700
ed074c
@@ -2192,6 +2192,10 @@ Slot::readCACCertificateFirst(CKYBuffer 
ed074c
 	if (throwException && (status != CKYSUCCESS)) {
ed074c
 	    handleConnectionError();
ed074c
 	}
ed074c
+        
ed074c
+        if(CKYBuffer_Size(cert) == 0) {
ed074c
+            handleConnectionError();
ed074c
+        }
ed074c
 	return status;
ed074c
     }
ed074c