[poppler] 2 commits - fofi/FoFiType1C.cc goo/GooString.h poppler/Form.cc

BrĂ¼ns, Stefan Stefan.Bruens at rwth-aachen.de
Wed Apr 10 18:21:07 UTC 2019


On Mittwoch, 10. April 2019 17:14:26 CEST GitLab Mirror wrote:

>  //========================================================================
> 
> @@ -64,8 +65,8 @@ char* pdfDocEncodingToUTF16 (const GooString* orig, int*
> length) char *result = new char[(*length)];
>    const char *cstring = orig->c_str();
>    //unicode marker
> -  result[0] = (char)0xfe;
> -  result[1] = (char)0xff;
> +  result[0] = '\xfe';
> +  result[1] = '\xff';

This will cause issues on all architectures where char is unsigned, e.g. ARM 
(32 and 64bit), PPC.

Please use an explicit "unsigned char" whenever you will assign values >= 0x80 
to it.

Regards,

Stefan


More information about the poppler mailing list