[NTG-pdftex] Patch 8BitString (was: Bug: <hex> string to () string)

Martin Schroeder ms@artcom-gmbh.de
Wed, 30 Jul 2003 10:54:48 +0200


On 2003-07-29 22:20:34 +0200, Heiko Oberdiek wrote:
> *** pdftoepdf.cc.org	Tue Jul 29 21:41:13 2003
> --- pdftoepdf.cc	Tue Jul 29 22:06:34 2003
> ***************
> *** 559,565 ****
>           if (strlen(p) == (unsigned int)l) {
>               pdf_puts("(");
>               for (; *p != 0; p++) {
> !                 c = *p;
>                   if (c == '(' || c == ')' || c == '\\')
>                       pdf_printf("\\%c", c);
>                   else if (c < 0x20 || c > 0x7F)
> --- 559,565 ----
>           if (strlen(p) == (unsigned int)l) {
>               pdf_puts("(");
>               for (; *p != 0; p++) {
> !                 c = (unsigned char)*p;
>                   if (c == '(' || c == ')' || c == '\\')
>                       pdf_printf("\\%c", c);
>                   else if (c < 0x20 || c > 0x7F)

It's in (#3496). Is there any way to catch bugs like these with
gcc? Or is C just broken?

Best regards
        Martin
-- 
               Martin Schröder, MS@ArtCom-GmbH.DE
     ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany
          Voice +49 421 20419-44 / Fax +49 421 20419-10