Blame SOURCES/0001-usb_modeswitch-fix-a-wrong-comparison.patch

9ed33a
From bcb5b8702adbf568598988fccf256586b5788fcb Mon Sep 17 00:00:00 2001
9ed33a
From: Lubomir Rintel <lkundrak@v3.sk>
9ed33a
Date: Fri, 18 Aug 2017 10:37:15 +0200
9ed33a
Subject: [PATCH 1/2] usb_modeswitch: fix a wrong comparison
9ed33a
9ed33a
The char pointer should be dereferences when checking the string is empty.
9ed33a
---
9ed33a
 usb_modeswitch.c | 2 +-
9ed33a
 1 file changed, 1 insertion(+), 1 deletion(-)
9ed33a
9ed33a
diff --git a/usb_modeswitch.c b/usb_modeswitch.c
9ed33a
index b2b930b..6948a84 100644
9ed33a
--- a/usb_modeswitch.c
9ed33a
+++ b/usb_modeswitch.c
9ed33a
@@ -1707,7 +1707,7 @@ struct libusb_device* search_devices( int *numFound, int vendor, char* productLi
9ed33a
 	*numFound = 0;
9ed33a
 
9ed33a
 	/* Sanity check */
9ed33a
-	if (!vendor || productList == '\0')
9ed33a
+	if (!vendor || *productList == '\0')
9ed33a
 		return NULL;
9ed33a
 
9ed33a
 	listcopy = malloc(strlen(productList)+1);
9ed33a
-- 
9ed33a
2.13.0
9ed33a