Revision: 4190
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4190&view=rev
Author: atkac
Date: 2010-11-11 13:18:02 +0000 (Thu, 11 Nov 2010)
Log Message:
-----------
[Bugfix] Xvnc: use strncpy instead of strncat to copy string to uninitialized
destination.
Modified Paths:
--------------
trunk/unix/xserver/hw/vnc/XserverDesktop.cc
Modified: trunk/unix/xserver/hw/vnc/XserverDesktop.cc
===================================================================
--- trunk/unix/xserver/hw/vnc/XserverDesktop.cc 2010-11-11 11:47:11 UTC (rev
4189)
+++ trunk/unix/xserver/hw/vnc/XserverDesktop.cc 2010-11-11 13:18:02 UTC (rev
4190)
@@ -255,7 +255,8 @@
struct utsname uts;
uname(&uts);
char* str = new char[256];
- strncat(str, uts.nodename, 240);
+ strncpy(str, uts.nodename, 240);
+ str[239] = '\0'; /* Ensure string is zero-terminated */
strcat(str, ":");
strncat(str, display, 10);
return str;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits