summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka ORACLE <christian.lippka@oracle.com>2011-01-03 18:04:13 +0100
committerPetr Mladek <pmladek@suse.cz>2011-01-07 20:49:19 +0100
commitab4df2adfa27f4dcb35e61795123eee32de602fb (patch)
treee8d4e7d5ff197f66d8f06a17d4083c0dbb6cd4b0
parent318672980a79e294ff2c4871c79f3e17cb6af1a9 (diff)
impress208: #164349# small TGAReader improvement
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx30
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
}
}
}