summaryrefslogtreecommitdiff
path: root/unotools/source/ucbhelper/ucblockbytes.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-11-25 09:47:46 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-11-25 09:47:46 +0000
commitfe078f2745f01426f034920eec3927210421154b (patch)
tree64ca2029386be1ec9c5e926a1637b910a53abf3f /unotools/source/ucbhelper/ucblockbytes.cxx
parent0c3134999f21461b2cdc9f471e3f2e39bc73bd42 (diff)
INTEGRATION: CWS valgrind01 (1.45.22); FILE MERGED
2003/11/03 15:41:54 hr 1.45.22.1: #i20184#: initialize buffer before writing to a stream
Diffstat (limited to 'unotools/source/ucbhelper/ucblockbytes.cxx')
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 13e1669833c1..9f5461469352 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucblockbytes.cxx,v $
*
- * $Revision: 1.45 $
+ * $Revision: 1.46 $
*
- * last change: $Author: vg $ $Date: 2003-07-25 11:35:45 $
+ * last change: $Author: rt $ $Date: 2003-11-25 10:47:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1653,6 +1653,7 @@ ErrCode UcbLockBytes::SetSize (ULONG nNewSize)
{
ULONG nDiff = nNewSize-nSize, nCount=0;
BYTE* pBuffer = new BYTE[ nDiff ];
+ memset(pBuffer, 0, nDiff); // initialize for enhanced security
WriteAt( nSize, pBuffer, nDiff, &nCount );
delete[] pBuffer;
if ( nCount != nDiff )