Commit 7acc0498ebfe13c48ecbaee718537a4c088cca5e

Authored by Jay Berkenbilt
1 parent 9bc73a49

cast arg to isspace to unsigned char

git-svn-id: svn+q:///qpdf/trunk@683 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing 1 changed file with 3 additions and 2 deletions
libqpdf/QPDF.cc
@@ -1342,7 +1342,8 @@ QPDF::readToken(InputSource* input) @@ -1342,7 +1342,8 @@ QPDF::readToken(InputSource* input)
1342 } 1342 }
1343 else 1343 else
1344 { 1344 {
1345 - if (isspace(ch) && (input->getLastOffset() == offset)) 1345 + if (isspace((unsigned char)ch) &&
  1346 + (input->getLastOffset() == offset))
1346 { 1347 {
1347 ++offset; 1348 ++offset;
1348 } 1349 }
@@ -1460,7 +1461,7 @@ QPDF::readObjectAtOffset(off_t offset, int exp_objid, int exp_generation, @@ -1460,7 +1461,7 @@ QPDF::readObjectAtOffset(off_t offset, int exp_objid, int exp_generation,
1460 char ch; 1461 char ch;
1461 if (this->file.read(&ch, 1)) 1462 if (this->file.read(&ch, 1))
1462 { 1463 {
1463 - if (! isspace(ch)) 1464 + if (! isspace((unsigned char)ch))
1464 { 1465 {
1465 this->file.seek(-1, SEEK_CUR); 1466 this->file.seek(-1, SEEK_CUR);
1466 break; 1467 break;