Consistently read |CPDF_StreamParser::m_pBuf| values as uint8_t.
Since the values are stored as uint8_t in |m_pBuf| and mostly used with
functions that take uint8_t, it does not make sense to read from
|m_pBuf| into a local variable of type int.
Change-Id: Ibd1b90fa37638ddc99c0f7c2c54c890130350769
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/64992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index 6b486eb..6d16458 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -217,7 +217,7 @@
if (!PositionIsInBounds())
return EndOfData;
- int ch = m_pBuf[m_Pos++];
+ uint8_t ch = m_pBuf[m_Pos++];
while (1) {
while (PDFCharIsWhitespace(ch)) {
if (!PositionIsInBounds())
@@ -377,7 +377,7 @@
if (!PositionIsInBounds())
return;
- int ch = m_pBuf[m_Pos++];
+ uint8_t ch = m_pBuf[m_Pos++];
while (1) {
while (PDFCharIsWhitespace(ch)) {
if (!PositionIsInBounds()) {
@@ -561,8 +561,7 @@
bool bFirst = true;
int code = 0;
while (PositionIsInBounds()) {
- int ch = m_pBuf[m_Pos++];
-
+ uint8_t ch = m_pBuf[m_Pos++];
if (ch == '>')
break;