From fe078f2745f01426f034920eec3927210421154b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Tue, 25 Nov 2003 09:47:46 +0000 Subject: [PATCH] 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 --- unotools/source/ucbhelper/ucblockbytes.cxx | 5 +++-- 1 file 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 )