From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0IvO-0006ix-BK for qemu-devel@nongnu.org; Wed, 12 Nov 2008 11:50:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0IvN-0006il-SG for qemu-devel@nongnu.org; Wed, 12 Nov 2008 11:50:38 -0500 Received: from [199.232.76.173] (port=46060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0IvN-0006ii-MN for qemu-devel@nongnu.org; Wed, 12 Nov 2008 11:50:37 -0500 Received: from savannah.gnu.org ([199.232.41.3]:48472 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0IvN-0003nz-BK for qemu-devel@nongnu.org; Wed, 12 Nov 2008 11:50:37 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1L0IvM-0000DO-Se for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:50:36 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1L0IvM-0000DJ-MY for qemu-devel@nongnu.org; Wed, 12 Nov 2008 16:50:36 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Wed, 12 Nov 2008 16:50:36 +0000 Subject: [Qemu-devel] [5707] r5531 made x509 certs not loadable (original patch from Henrik Holst ). Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5707 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5707 Author: balrog Date: 2008-11-12 16:50:36 +0000 (Wed, 12 Nov 2008) Log Message: ----------- r5531 made x509 certs not loadable (original patch from Henrik Holst). The patch in r5531 which replaced a bunch of strncpy with pstrcpy causes the x509 credentials from the -vnc parameter to be one character shorter than entered meaning that there is currently no way to enter x509 certificates... Modified Paths: -------------- trunk/vnc.c Modified: trunk/vnc.c =================================================================== --- trunk/vnc.c 2008-11-12 16:41:32 UTC (rev 5706) +++ trunk/vnc.c 2008-11-12 16:50:36 UTC (rev 5707) @@ -2329,10 +2329,8 @@ end = strchr(options, ','); if (start && (!end || (start < end))) { int len = end ? end-(start+1) : strlen(start+1); - char *path = qemu_malloc(len+1); + char *path = qemu_strndup(start + 1, len); - pstrcpy(path, len, start + 1); - path[len] = '\0'; VNC_DEBUG("Trying certificate path '%s'\n", path); if (vnc_set_x509_credential_dir(vs, path) < 0) { fprintf(stderr, "Failed to find x509 certificates/keys in %s\n", path);