diff options
author | Martin Gallwey <mtg@openoffice.org> | 2001-05-15 12:05:28 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2001-05-15 12:05:28 +0000 |
commit | e8f99d4c4ecc81ac1069ee605d48b18405dbee9b (patch) | |
tree | 49caff62bc841b85fb656258e8e120fd098407aa /package | |
parent | 5eadc19940ca71caca8918c1bd8991ca8be47a1b (diff) |
readBytes is responsible for reallocing the calling stream
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackageBuffer.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx index a7f3a235ef7e..550b7c485591 100644 --- a/package/source/zippackage/ZipPackageBuffer.cxx +++ b/package/source/zippackage/ZipPackageBuffer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackageBuffer.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: mtg $ $Date: 2001-04-19 14:16:31 $ + * last change: $Author: mtg $ $Date: 2001-05-15 13:05:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,6 +109,7 @@ sal_Int32 SAL_CALL ZipPackageBuffer::readBytes( Sequence< sal_Int8 >& aData, sal if (nBytesToRead + nCurrent > nEnd) nBytesToRead = static_cast < sal_Int32 > (nEnd - nCurrent); + aData.realloc ( nBytesToRead ); memcpy(aData.getArray(), aBuffer.getConstArray() + nCurrent, nBytesToRead); nCurrent +=nBytesToRead; return nBytesToRead; |