From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtiul-0007Ls-9J for qemu-devel@nongnu.org; Wed, 17 Aug 2011 12:24:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qtiuj-0002jD-BM for qemu-devel@nongnu.org; Wed, 17 Aug 2011 12:24:23 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:49243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qtiuj-0002i0-04 for qemu-devel@nongnu.org; Wed, 17 Aug 2011 12:24:21 -0400 Message-ID: <4E4BEB50.2080800@rdsoftware.de> Date: Wed, 17 Aug 2011 18:24:48 +0200 From: Erik Rull MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] USB port NULL pointer causes segv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, in usb-linux.c my qemu crashes in static int usb_host_open(USBHostDevice *dev, int bus_num, int addr, char *port, const char *prod_name, int speed) because port is NULL. The line that causes the problem is: strcpy(dev->port, port); All Ports are displayed in the qemu monitor info as (null) when changing the line to: if (port) strcpy(dev->port, port); else dev->port[0] = '\0'; everything is fine :-) Please check this issue and let me know if my workaround is okay. Best regards, Erik