2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

fix problems or otherwise improve code based on issues raised by Klocwork

git-svn-id: svn+q:///qpdf/trunk@690 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-09-14 01:31:46 +00:00
parent b93c34099c
commit 0ded90eff9
4 changed files with 12 additions and 12 deletions

View File

@ -147,7 +147,7 @@ PCRE::Match::nMatches() const
return this->nmatches;
}
PCRE::PCRE(char const* pattern, int options) throw (Exception)
PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception)
{
char const *errptr;
int erroffset;

View File

@ -113,19 +113,17 @@ QPDF::isLinearized()
}
else
{
if ((p = (char*)memchr(p, '\0', tbuf_size - (p - buf))) != 0)
p = (char*)memchr(p, '\0', tbuf_size - (p - buf));
assert(p != 0);
while ((p - buf < tbuf_size) && (*p == 0))
{
QTC::TC("qpdf", "QPDF lindict null found");
while ((p - buf < tbuf_size) && (*p == 0))
{
++p;
}
if ((p - buf) == tbuf_size)
{
break;
}
QTC::TC("qpdf", "QPDF lindict searching after null");
++p;
}
if ((p - buf) == tbuf_size)
{
break;
}
QTC::TC("qpdf", "QPDF lindict searching after null");
}
}

View File

@ -15,6 +15,7 @@ FILE* safe_fopen(char const* filename, char const* mode)
{
std::cerr << "fopen " << filename << " failed: " << strerror(errno)
<< std::endl;
exit(2);
}
return result;
}

View File

@ -15,6 +15,7 @@ FILE* safe_fopen(char const* filename, char const* mode)
{
std::cerr << "fopen " << filename << " failed: " << strerror(errno)
<< std::endl;
exit(2);
}
return result;
}