diff options
Diffstat (limited to 'Build/source/texk/chktex/chktex-1.7.2-PATCHES')
3 files changed, 33 insertions, 0 deletions
diff --git a/Build/source/texk/chktex/chktex-1.7.2-PATCHES/ChangeLog b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/ChangeLog index dcde8acf28d..eb1f0d5d0a4 100644 --- a/Build/source/texk/chktex/chktex-1.7.2-PATCHES/ChangeLog +++ b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/ChangeLog @@ -1,3 +1,8 @@ +2014-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-01-sequence-point (new): Avoid an undefined operation. + * patch-02-unsigned (new): Avoid undefined behaviour. + 2013-05-30 Peter Breitenlohner <peb@mppmu.mpg.de> Import chktex-1.7.2. diff --git a/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-01-sequence-point b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-01-sequence-point new file mode 100644 index 00000000000..469c1fa77ca --- /dev/null +++ b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-01-sequence-point @@ -0,0 +1,14 @@ + Avoid an operation that may be undefined. + +diff -ur chktex-1.7.2.orig/FindErrs.c chktex-1.7.2/FindErrs.c +--- chktex-1.7.2.orig/FindErrs.c 2013-04-18 05:43:10.000000000 +0200 ++++ chktex-1.7.2/FindErrs.c 2014-06-19 11:19:40.000000000 +0200 +@@ -1171,7 +1171,7 @@ + tmp = stpcpy(tmp, SilentCase.Stack.Data[i]); + *tmp++ = '|'; + } +- tmp = stpcpy(--tmp, ")"); ++ tmp = stpcpy(tmp - 1, ")"); + + SilentRegex = malloc( sizeof(regex_t) ); + rc = regcomp(SilentRegex, pattern, REGEX_FLAGS); diff --git a/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-02-unsigned b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-02-unsigned new file mode 100644 index 00000000000..bced537d868 --- /dev/null +++ b/Build/source/texk/chktex/chktex-1.7.2-PATCHES/patch-02-unsigned @@ -0,0 +1,14 @@ + Avoid undefined behaviour when char is signed. + +diff -ur chktex-1.7.2.orig/FindErrs.c chktex-1.7.2/FindErrs.c +--- chktex-1.7.2.orig/FindErrs.c 2014-06-19 11:19:40.000000000 +0200 ++++ chktex-1.7.2/FindErrs.c 2014-06-19 11:21:36.000000000 +0200 +@@ -342,7 +342,7 @@ + EscapePtr = ++TmpPtr; /* move past NUL terminator */ + while ( *EscapePtr ) + { +- *EscapePtr = tolower(*EscapePtr); ++ *EscapePtr = tolower((unsigned char)*EscapePtr); + ++EscapePtr; + } + |