Hi,

playing with valgrind around the Tight Decoder issue, it noticed those two 
wrong delete/free, fixed by the very simple attached patch.

==6939== Mismatched free() / delete / delete []
==6939==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==6939==    by 0x4BFB91: rfb::Security::Security(rfb::StringParameter&) 
(Security.cxx:66)
==6939==    by 0x4A76A9: rfb::SecurityClient::SecurityClient() 
(SecurityClient.h:33)
==6939==    by 0x4A61EF: rfb::CConnection::CConnection() 
(CConnection.cxx:39)
==6939==    by 0x448996: CConn::CConn(char const*) (CConn.cxx:73)
==6939==    by 0x459285: main (vncviewer.cxx:296)
==6939==  Address 0x4c35990 is 0 bytes inside a block of size 64 alloc'd
==6939==    at 0x4A055EC: operator new[](unsigned long) 
(vg_replace_malloc.c:264)
==6939==    by 0x4CFC74: rfb::strDup(char const*) (util.cxx:137)
==6939==    by 0x4AAD35: rfb::StringParameter::getValueStr() const 
(Configuration.cxx:444)
==6939==    by 0x44D940: rfb::StringParameter::getData() const 
(Configuration.h:248)
==6939==    by 0x4BFB34: rfb::Security::Security(rfb::StringParameter&) 
(Security.cxx:63)
==6939==    by 0x4A76A9: rfb::SecurityClient::SecurityClient() 
(SecurityClient.h:33)
==6939==    by 0x4A61EF: rfb::CConnection::CConnection() 
(CConnection.cxx:39)
==6939==    by 0x448996: CConn::CConn(char const*) (CConn.cxx:73)
==6939==    by 0x459285: main (vncviewer.cxx:296)
==6939== 

==6939== Mismatched free() / delete / delete []
==6939==    at 0x4A04D72: free (vg_replace_malloc.c:325)
==6939==    by 0x448E1A: CConn::~CConn() (CConn.cxx:127)
==6939==    by 0x448EDD: CConn::~CConn() (CConn.cxx:131)
==6939==    by 0x45932A: main (vncviewer.cxx:311)
==6939==  Address 0x4c36620 is 0 bytes inside a block of size 10 alloc'd
==6939==    at 0x4A055EC: operator new[](unsigned long) 
(vg_replace_malloc.c:264)
==6939==    by 0x4CFD8E: rfb::strSplit(char const*, char, char**, char**, 
bool) (util.cxx:159)
==6939==    by 0x448888: rfb::getHostAndPort(char const*, char**, int*, 
int) (Hostname.h:39)
==6939==    by 0x448B75: CConn::CConn(char const*) (CConn.cxx:96)
==6939==    by 0x459285: main (vncviewer.cxx:296)
==6939== 

-- 
Matthieu Lochegnies
Altis Semiconductor - http://www.altissemiconductor.com/

Attachment: tigervnc_string_free.patch
Description: Binary data

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to