diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 1 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfparse.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 3809f8f13b3..32f8b7bf20d 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,6 +1,7 @@ 2014-11-04 Peter Breitenlohner <peb@mppmu.mpg.de> * pkfont.c: Fix the messed up formatting codes. + * pdfparse.c: Avoid undefined behaviour when char is signed. 2014-11-03 Shunsaku Hirata <shunsaku.hirata74@gmail.com> diff --git a/Build/source/texk/dvipdfm-x/pdfparse.c b/Build/source/texk/dvipdfm-x/pdfparse.c index ab874ff11f0..b29dd64da74 100644 --- a/Build/source/texk/dvipdfm-x/pdfparse.c +++ b/Build/source/texk/dvipdfm-x/pdfparse.c @@ -240,7 +240,7 @@ parse_pdf_number (const char **pp, const char *endptr) p = *pp; skip_white(&p, endptr); if (p >= endptr || - (!isdigit(p[0]) && p[0] != '.' && + (!isdigit((unsigned char)p[0]) && p[0] != '.' && p[0] != '+' && p[0] != '-')) { WARN("Could not find a numeric object."); return NULL; @@ -270,7 +270,7 @@ parse_pdf_number (const char **pp, const char *endptr) } else { has_dot = 1; } - } else if (isdigit(p[0])) { + } else if (isdigit((unsigned char)p[0])) { if (has_dot) { v += (p[0] - '0') / pow(10, nddigits + 1); nddigits++; |