nvi-14-private_regex_fixes.patch (1128B)
1 #! /bin/sh /usr/share/dpatch/dpatch-run 2 ## 14private_regex_fixes.dpatch by <hesso@pool.math.tu-berlin.de> 3 ## 4 ## DP: Fixes to the private regex library; includes fix for #523934. 5 6 @DPATCH@ 7 diff -Naur regex.orig/regcomp.c regex/regcomp.c 8 --- nvi-1.81.6.orig/regex/regcomp.c 2007-11-18 17:41:42.000000000 +0100 9 +++ nvi-1.81.6/regex/regcomp.c 2008-05-01 18:37:57.000000000 +0200 10 @@ -606,7 +606,8 @@ 11 REQUIRE(starordinary, REG_BADRPT); 12 /* FALLTHROUGH */ 13 default: 14 - ordinary(p, c &~ BACKSL); 15 + /* ordinary(p, c &~ BACKSL); -- Fix potential overflow */ 16 + ordinary(p, c & 0xff); 17 break; 18 } 19 20 diff -Naur regex.orig/regexec.c regex/regexec.c 21 --- nvi-1.81.6.orig/regex/regexec.c 2007-11-18 17:41:42.000000000 +0100 22 +++ nvi-1.81.6/regex/regexec.c 2008-05-01 18:38:00.000000000 +0200 23 @@ -63,7 +63,7 @@ 24 25 /* macros for manipulating states, small version */ 26 #define states int 27 -#define states1 states /* for later use in regexec() decision */ 28 +typedef states states1; /* for later use in regexec() decision */ 29 #define CLEAR(v) ((v) = 0) 30 #define SET0(v, n) ((v) &= ~(1 << (n))) 31 #define SET1(v, n) ((v) |= 1 << (n))