summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_meshstream.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-03-01 00:32:20 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-01 16:45:36 +0000
commitef81390393ef5fed1ba168cff081d459eed9f260 (patch)
tree89dcc109865b846a95a3f6e121d900e9a03b240d /core/fpdfapi/page/cpdf_meshstream.h
parente13ad88925bde037f4ed3b60f9ea5f01b883aa6e (diff)
downloadpdfium-ef81390393ef5fed1ba168cff081d459eed9f260.tar.xz
Fix infinite loops in CPDF_MeshStream.
BUG=chromium:690501 Change-Id: I74b09d90a8082554a67f737eb6adc3bff82ed93e Reviewed-on: https://pdfium-review.googlesource.com/2889 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_meshstream.h')
-rw-r--r--core/fpdfapi/page/cpdf_meshstream.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_meshstream.h b/core/fpdfapi/page/cpdf_meshstream.h
index 24f1d66cfd..d40de4a013 100644
--- a/core/fpdfapi/page/cpdf_meshstream.h
+++ b/core/fpdfapi/page/cpdf_meshstream.h
@@ -42,11 +42,17 @@ class CPDF_MeshStream {
bool Load();
+ bool CanReadFlag() const;
+ bool CanReadCoords() const;
+ bool CanReadColor() const;
+
uint32_t ReadFlag();
CFX_PointF ReadCoords();
std::tuple<FX_FLOAT, FX_FLOAT, FX_FLOAT> ReadColor();
- CPDF_MeshVertex ReadVertex(const CFX_Matrix& pObject2Bitmap, uint32_t* flag);
+ bool ReadVertex(const CFX_Matrix& pObject2Bitmap,
+ CPDF_MeshVertex* vertex,
+ uint32_t* flag);
bool ReadVertexRow(const CFX_Matrix& pObject2Bitmap,
int count,
CPDF_MeshVertex* vertex);