From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0zpW-0007WN-Kx for qemu-devel@nongnu.org; Fri, 14 Nov 2008 09:39:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0zpT-0007Ts-98 for qemu-devel@nongnu.org; Fri, 14 Nov 2008 09:39:25 -0500 Received: from [199.232.76.173] (port=34410 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0zpT-0007Th-09 for qemu-devel@nongnu.org; Fri, 14 Nov 2008 09:39:23 -0500 Received: from ug-out-1314.google.com ([66.249.92.174]:59318) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0zpT-0006dW-4Q for qemu-devel@nongnu.org; Fri, 14 Nov 2008 09:39:23 -0500 Received: by ug-out-1314.google.com with SMTP id 29so1933685ugc.36 for ; Fri, 14 Nov 2008 06:39:19 -0800 (PST) Subject: Re: [Qemu-devel] r5531 made x509 certs not loadable [PATCH] From: Henrik Holst Content-Type: text/plain Date: Fri, 14 Nov 2008 15:39:16 +0100 Message-Id: <1226673556.6460.14.camel@henrik-desktop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 >2008/11/12 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... >> >> The attached patch fixes this. Also the path[len]='\0' is unnecessary >> now that pstrcpy is used. The problem was that the previous strncpy was >> called correctly which the r5531 patch didn't think. And due to how the >> code is a memcpy could probably be used instead... > >Thanks for spotting. I made it a qemu_strndup instead because that's >basically what's being implemented here (to be exact it could be a >memdup() here because the length is already known). Please test. > >Cheers Works like a charm! /Henrik Holst Witsbits AB