summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-27 10:38:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-27 10:39:20 +0000
commit521723b1180a32c02a88ed47137d4242c06eaca7 (patch)
tree3cceaf2e44e5557f023ab9c05ba57727ed2afc2b /filter
parentb593c9c5b80bff9651cfde8f7c204b5d8e811155 (diff)
move deref inside (laughable) nSecurityCount check
Change-Id: Idf9a83ffa80137967d8c77d7a9b5133529fc2858
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 63ef80de4242..989bc4392a98 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -76,10 +76,9 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
long nRetValue = 0;
while ( ( --nSecurityCount ) && ( ( *rBuf == ' ' ) || ( *rBuf == 0x9 ) ) )
rBuf++;
- sal_uInt8 nByte = *rBuf;
- while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
+ while ( nSecurityCount && ( *rBuf != ' ' ) && ( *rBuf != 0x9 ) && ( *rBuf != 0xd ) && ( *rBuf != 0xa ) )
{
- switch ( nByte )
+ switch ( *rBuf )
{
case '.' :
// we'll only use the integer format
@@ -89,17 +88,17 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
bNegative = true;
break;
default :
- if ( ( nByte < '0' ) || ( nByte > '9' ) )
+ if ( ( *rBuf < '0' ) || ( *rBuf > '9' ) )
nSecurityCount = 1; // error parsing the bounding box values
else if ( bValid )
{
nRetValue *= 10;
- nRetValue += nByte - '0';
+ nRetValue += *rBuf - '0';
}
break;
}
nSecurityCount--;
- nByte = *(++rBuf);
+ ++rBuf;
}
if ( bNegative )
nRetValue = -nRetValue;