summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp/db
diff options
context:
space:
mode:
authorAndreas Bille <abi@openoffice.org>2001-07-05 17:50:40 +0000
committerAndreas Bille <abi@openoffice.org>2001-07-05 17:50:40 +0000
commit4ca45e5081ba1fbffcb154589f253c0844e7fd58 (patch)
treef7c077223674964fe4d46704d450b974922cc7f4 /xmlhelp/source/cxxhelp/db
parent7187b23ccdb0b75119edadf3b2db7953f85055d9 (diff)
#89246#
Refcounting ConceptData, so not freeing it twice, which causes the GPF. Fixed some memory leaks. Fixing a memory overwrite in BreeDict.cxx
Diffstat (limited to 'xmlhelp/source/cxxhelp/db')
-rw-r--r--xmlhelp/source/cxxhelp/db/Block.cxx8
-rw-r--r--xmlhelp/source/cxxhelp/db/BtreeDict.cxx6
2 files changed, 9 insertions, 5 deletions
diff --git a/xmlhelp/source/cxxhelp/db/Block.cxx b/xmlhelp/source/cxxhelp/db/Block.cxx
index a9282a3edc44..c9bb5368241c 100644
--- a/xmlhelp/source/cxxhelp/db/Block.cxx
+++ b/xmlhelp/source/cxxhelp/db/Block.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Block.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: abi $ $Date: 2001-05-10 15:25:10 $
+ * last change: $Author: abi $ $Date: 2001-07-05 18:50:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,6 +58,9 @@
*
*
************************************************************************/
+#ifndef _RTL_MEMORY_H_
+#include <rtl/memory.h>
+#endif
#ifndef _XMLSEARCH_DB_BLOCK_HXX_
#include <db/Block.hxx>
#endif
@@ -88,6 +91,7 @@ Block::Block( const DBEnv* dbenv )
dataL_( dbenv->getDataLen() ),
data_( new sal_Int8[ dbenv->getDataLen() ] )
{
+ rtl_zeroMemory( data_,dataL_ );
}
diff --git a/xmlhelp/source/cxxhelp/db/BtreeDict.cxx b/xmlhelp/source/cxxhelp/db/BtreeDict.cxx
index 9c3cf80bd6da..06a970f77f18 100644
--- a/xmlhelp/source/cxxhelp/db/BtreeDict.cxx
+++ b/xmlhelp/source/cxxhelp/db/BtreeDict.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: BtreeDict.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: abi $ $Date: 2001-06-22 14:13:18 $
+ * last change: $Author: abi $ $Date: 2001-07-05 18:50:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -368,7 +368,7 @@ BtreeDict::BtreeDict( const util::IndexAccessor& indexAccessor ) throw( IOExcept
{
sal_Int32 len = SCHEMA->length();
char* bff = new char[ 1 + len ];
- bff[ 1 + len ] = 0;
+ bff[ len ] = 0;
SCHEMA->readBytes( reinterpret_cast<sal_Int8*>( bff ),len );
delete SCHEMA;