diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:23:04 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-10-13 07:23:04 +0000 |
commit | 6fe0c7617737efc274c916daca3b12b6e09655a7 (patch) | |
tree | a9941f8fdf28fe5b4eb3a9cf62020135870daa63 /rsc | |
parent | 5725e6ab47c4e81add79a4d26496944718aa1cb9 (diff) |
INTEGRATION: CWS vcl27 (1.2.144); FILE MERGED
2004/09/09 11:05:05 pl 1.2.144.1: #i34002# prevent internal buffer overflow
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rsctools.hxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx index bd0da7566dfb..d3eacca6db26 100644 --- a/rsc/inc/rsctools.hxx +++ b/rsc/inc/rsctools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: rsctools.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pl $ $Date: 2001-10-10 11:51:13 $ + * last change: $Author: hr $ $Date: 2004-10-13 08:23:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,9 +116,9 @@ public: class RscMem { public: - static void * Malloc( USHORT nSize ); - static void * Realloc( void * pMem, USHORT nSize ); - static char * Realloc( char * pMem, USHORT nSize ){ + static void * Malloc( unsigned int nSize ); + static void * Realloc( void * pMem, unsigned int nSize ); + static char * Realloc( char * pMem, unsigned int nSize ){ return (char *)Realloc( (void *)pMem, nSize ); } static void Free( void * pMem ); @@ -138,7 +138,8 @@ public: ~RscPtrPtr(); void Reset(); USHORT Append( void * ); - USHORT Append( char * pStr ){ + USHORT Append( char * pStr ){ printf( "\n" ); + return( Append( (void *)pStr ) ); }; USHORT GetCount(){ return( nCount ); }; @@ -149,15 +150,15 @@ public: /****************** R s c W r i t e R c **********************************/ class RscWriteRc { - USHORT nLen; + unsigned int nLen; BOOL bSwap; RSCBYTEORDER_TYPE nByteOrder; char * pMem; - char * GetPointer( USHORT nSize ); + char * GetPointer( unsigned int nSize ); public: RscWriteRc( RSCBYTEORDER_TYPE nOrder = RSC_SYSTEMENDIAN ); ~RscWriteRc(); - USHORT IncSize( USHORT nSize );// gibt die vorherige Groesse + unsigned int IncSize( unsigned int nSize );// gibt die vorherige Groesse void * GetBuffer() { return GetPointer( 0 ); @@ -173,7 +174,7 @@ public: RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; } - USHORT Size(){ return( nLen ); }; + unsigned int Size(){ return( nLen ); }; //void Put( void * pData, USHORT nSize ); void Put( INT32 lVal ) { |