qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [5707] r5531 made x509 certs not loadable (original patch f


From: Andrzej Zaborowski
Subject: [Qemu-devel] [5707] r5531 made x509 certs not loadable (original patch from Henrik Holst ).
Date: Wed, 12 Nov 2008 16:50:36 +0000

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);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]