aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-25 11:21:28 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-25 11:21:28 +0000
commitbe15b141e0dddd9f41e464ca98aef1b05b28cf6b (patch)
tree94b26dd8001eef4275e68fe03cf85990d4bfea5a /vnc.c
parent9b4c14c35bff99476b0223e87532f8d53a9909c4 (diff)
Replace uses of strncpy (a GNU extension) with Qemu pstrcpy
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnc.c b/vnc.c
index 266460ff5d..9df4dbe137 100644
--- a/vnc.c
+++ b/vnc.c
@@ -2337,7 +2337,8 @@ int vnc_display_open(DisplayState *ds, const char *display)
if (start && (!end || (start < end))) {
int len = end ? end-(start+1) : strlen(start+1);
char *path = qemu_malloc(len+1);
- strncpy(path, 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) {