Browse Source

Bugfix: mcp2210: Check for NULL hid device strings before trying to convert them to ASCII

Luke Dashjr 12 years ago
parent
commit
3d37319f48
1 changed files with 3 additions and 0 deletions
  1. 3 0
      mcp2210.c

+ 3 - 0
mcp2210.c

@@ -143,6 +143,9 @@ void mcp2210_devinfo_free(struct lowlevel_device_info * const info)
 static
 char *wcs2str_dup(wchar_t *ws)
 {
+	if (!ws)
+		return NULL;
+	
 	char *rv;
 	int clen, i;