diff options
author | Christian Lippka ORACLE <christian.lippka@oracle.com> | 2011-01-03 18:04:13 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-01-07 20:49:19 +0100 |
commit | ab4df2adfa27f4dcb35e61795123eee32de602fb (patch) | |
tree | e8d4e7d5ff197f66d8f06a17d4083c0dbb6cd4b0 | |
parent | 318672980a79e294ff2c4871c79f3e17cb6af1a9 (diff) |
impress208: #164349# small TGAReader improvement
-rw-r--r-- | filter/source/graphicfilter/itga/itga.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx index c991d184a..d989f9d31 100644 --- a/filter/source/graphicfilter/itga/itga.cxx +++ b/filter/source/graphicfilter/itga/itga.cxx @@ -339,6 +339,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -361,6 +364,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -388,6 +394,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -408,6 +417,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -441,6 +453,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -458,6 +473,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -484,6 +502,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -501,6 +522,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -529,6 +553,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } @@ -549,6 +576,9 @@ BOOL TGAReader::ImplReadBody() nXCount = 0; nY += nYAdd; nYCount++; + + if( nYCount >= mpFileHeader->nImageHeight ) + return false; // invalid picture } } } |