diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 06:50:54 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 06:50:54 +0000 |
commit | 9304350f1159cedc258bac632904af50aed26edf (patch) | |
tree | c35dc6aae0421e187f4fed090d9a68cd84f1f4ff /goodies | |
parent | ae8a05b37ae3a7ece61451bd6d70f46118c85009 (diff) |
CWS-TOOLING: integrate CWS impress149
Diffstat (limited to 'goodies')
-rw-r--r-- | goodies/source/filter.vcl/ipcx/ipcx.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/goodies/source/filter.vcl/ipcx/ipcx.cxx b/goodies/source/filter.vcl/ipcx/ipcx.cxx index 0d8d5a1cfdac..af8e46c5ba67 100644 --- a/goodies/source/filter.vcl/ipcx/ipcx.cxx +++ b/goodies/source/filter.vcl/ipcx/ipcx.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ipcx.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.30.1 $ * * This file is part of OpenOffice.org. * @@ -182,6 +182,13 @@ void PCXReader::ImplReadHeader() *pPCX >> nbyte; nBitsPerPlanePix = (ULONG)nbyte; *pPCX >> nMinX >> nMinY >> nMaxX >> nMaxY; + + if ((nMinX > nMaxX) || (nMinY > nMaxY)) + { + nStatus = FALSE; + return; + } + nWidth = nMaxX-nMinX+1; nHeight = nMaxY-nMinY+1; @@ -234,6 +241,11 @@ void PCXReader::ImplReadBody() nCount = 0; for ( ny = 0; ny < nHeight; ny++ ) { + if (pPCX->GetError() || pPCX->IsEof()) + { + nStatus = FALSE; + break; + } nPercent = ny * 60 / nHeight + 10; if ( ny == 0 || nLastPercent + 4 <= nPercent ) { |