Description: Misc bug fixes. Resolves: #485032, #250738, #497758.
Origin: http://pkgs.fedoraproject.org/gitweb/?p=coolkey.git;a=commit;h=35fc0905e715f5851f0093726e1f5d5fd335e390
Author: Jack Magne <jmagne@fedoraproject.org>
Date:   Thu Sep 17 00:09:52 2009 +0000
 SVN rev 81

--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,6 @@
 SUBDIRS += src/install
 endif
 
-ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = cookey.spec LICENSE
 
--- a/configure.in
+++ b/configure.in
@@ -124,9 +124,9 @@
 if test $WINDOWS -ne 1; then
   PKG_CHECK_MODULES(NSS, nss, true, [ AC_MSG_ERROR(could not find NSS Crypto libraries) ])
 fi
-  enable_pk11install = "yes"
+  enable_pk11install="yes"
 else
-  enable_pk11install = "no"
+  enable_pk11install="no"
   AC_MSG_WARN([skipping pk11install])
 fi
 
--- a/src/coolkey/object.cpp
+++ b/src/coolkey/object.cpp
@@ -397,7 +397,7 @@
 {
     // clean up old one
     if (label) {
-	delete label;
+	delete [] label;
 	label = NULL;
     }
     // find matching attribute
--- a/src/coolkey/object.h
+++ b/src/coolkey/object.h
@@ -82,7 +82,7 @@
     PKCS11Object(unsigned long muscleObjID, CK_OBJECT_HANDLE handle);
     PKCS11Object(unsigned long muscleObjID, const CKYBuffer *data,
         CK_OBJECT_HANDLE handle);
-    ~PKCS11Object() { delete label; delete name; CKYBuffer_FreeData(&pubKey); }
+    ~PKCS11Object() { delete [] label; delete [] name; CKYBuffer_FreeData(&pubKey); }
 
     PKCS11Object(const PKCS11Object& cpy) :
         attributes(cpy.attributes), muscleObjID(cpy.muscleObjID),
--- a/src/coolkey/slot.cpp
+++ b/src/coolkey/slot.cpp
@@ -979,7 +979,7 @@
 //
 #define COOLKEY "CoolKey"
 #define POSSESSION " for "
-    if (!personName || personName == "") {
+    if (!personName || personName[0] == '\0' ) {
 	const int coolKeySize = sizeof(COOLKEY) ;
 	memcpy(label, COOLKEY, coolKeySize-1);
 	makeSerialString(&label[coolKeySize], maxSize-coolKeySize, cuid);
@@ -1528,7 +1528,7 @@
     }
     sprintf(segName,SEGMENT_PREFIX"%s",readerName); 
     segment = SHMem::initSegment(segName, MAX_OBJECT_STORE_SIZE, needInit);
-    delete segName;
+    delete [] segName;
     if (!segment) {
 	// just run without shared memory
 	return;
