[poppler] Branch 'poppler-0.18' - poppler/Lexer.cc

Albert Astals Cid aacid at kde.org
Sun Feb 5 07:02:25 PST 2012


El Diumenge, 5 de febrer de 2012, a les 06:59:29, Leonard Rosenthol va 
escriure:
> You need to be careful here, since there are places in the PDF spec where
> you MUST have an integer and returning a real would be bad.

That's ok, if it MUST have an integer we MUST use Object::getInt that will 
fail for reals.

Albert

> Leonard
> 
> -----Original Message-----
> From: poppler-bounces+leonardr=adobe.com at lists.freedesktop.org
> [mailto:poppler-bounces+leonardr=adobe.com at lists.freedesktop.org] On Behalf
> Of Adrian Johnson Sent: Sunday, February 05, 2012 9:45 AM
> To: poppler at lists.freedesktop.org
> Subject: [poppler] Branch 'poppler-0.18' - poppler/Lexer.cc
> 
>  poppler/Lexer.cc |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> New commits:
> commit fb629ac684a7f05d95d10285807c2cf1602d28ca
> Author: Adrian Johnson <ajohnson at redneon.com>
> Date:   Sat Feb 4 17:13:30 2012 +1030
> 
>     Lexer: convert integer to real when overflow occurs
> 
>     Bug 45605
>     (cherry picked from commit 38ec58ed1cb54722aece875287b847643aa2c4b8)
> 
> diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc index 6250d40..98a9403
> 100644 --- a/poppler/Lexer.cc
> +++ b/poppler/Lexer.cc
> @@ -228,11 +228,13 @@ Object *Lexer::getObj(Object *obj, int objNum) {
>  	break;
>        }
>      }
> -    if (neg)
> +    if (neg) {
>        xi = -xi;
> +      xf = -xf;
> +    }
>      if (unlikely(overflownInteger)) {
>        if (overflownUnsignedInteger) {
> -        obj->initError();
> +        obj->initReal(xf);
>        } else {
>          obj->initUint(xui);
>        }
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list