Blame SOURCES/coolkey-cac-1.patch

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