[omniORB] giopStream possible uninitializing error
Ales Teska
alex@cyber.cz
Tue Mar 18 14:50:03 2003
Hi,
i`m using omniORB in my project and i found (by valgrind),
one error 'by using uninitialized value'. It happens everytime omniORB
allocate new buffer and it`s proceed to send.
To prevent this error i use patch bellow (it`s dirty, sorry).
Alex
-------------------- CUT HERE -----------
--- giopStream.cc.orig 2003-03-18 12:01:46.000000000 +0100
+++ giopStream.cc 2003-03-18 11:57:35.000000000 +0100
@@ -659,6 +659,7 @@
// giopStream_Buffer* b = (giopStream_Buffer*)
// (new char[sz + sizeof(giopStream_Buffer) + 8]);
char* p = new char[sz + sizeof(giopStream_Buffer) + 8];
+ ::memset(p,0,sz + sizeof(giopStream_Buffer) + 8);
giopStream_Buffer* b = (giopStream_Buffer*)p;
b->alignStart(omni::ALIGN_8);
b->end = b->start + sz;
-------------------- CUT HERE -----------
-------------------------------------------------------
--
S pranim prijemneho dne
Ales Teska
Pod zvahovem 46
Praha 5
Tel. : +420 777 256 259
Email : teska@tornado.greatnet.cz