Blame SOURCES/ccid-1.4.10-coverity.patch

68895e
diff -up ./src/ccid_usb.c.coverity ./src/ccid_usb.c
68895e
--- ./src/ccid_usb.c.coverity	2018-05-23 13:08:07.321600659 -0700
68895e
+++ ./src/ccid_usb.c	2018-05-23 13:20:29.927742791 -0700
68895e
@@ -1040,7 +1040,7 @@ static unsigned int *get_data_rates(unsi
68895e
 			n = len;
68895e
 	}
68895e
 
68895e
-	int_array = calloc(n+1, sizeof(int));
68895e
+	int_array = calloc(n+1, sizeof(int_array[0]));
68895e
 	if (NULL == int_array)
68895e
 	{
68895e
 		DEBUG_CRITICAL("Memory allocation failed");
68895e
diff -up ./src/ifdhandler.c.coverity ./src/ifdhandler.c
68895e
--- ./src/ifdhandler.c.coverity	2018-05-23 13:08:25.497629268 -0700
68895e
+++ ./src/ifdhandler.c	2018-05-23 13:19:08.247618812 -0700
68895e
@@ -139,8 +139,10 @@ static RESPONSECODE CreateChannelByNameO
68895e
 
68895e
 		/* The reader may have to start here so give it some time */
68895e
 		ret = CmdGetSlotStatus(reader_index, pcbuffer);
68895e
-		if (IFD_NO_SUCH_DEVICE == ret)
68895e
-			return ret;
68895e
+		if (IFD_NO_SUCH_DEVICE == ret) {
68895e
+			return_value = ret;
68895e
+			goto error;
68895e
+		}
68895e
 
68895e
 		/* save the current read timeout computed from card capabilities */
68895e
 		oldReadTimeout = ccid_descriptor->readTimeout;