filter/source/graphicfilter/ieps/ieps.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 521723b1180a32c02a88ed47137d4242c06eaca7 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jan 27 10:38:44 2017 +0000 move deref inside (laughable) nSecurityCount check Change-Id: Idf9a83ffa80137967d8c77d7a9b5133529fc2858 diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 63ef80d..989bc43 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;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits