nvi/nvi-28-regex_widechar.patch
2010-06-26 08:29:45 +00:00

20 lines
616 B
Diff

#! /bin/sh /usr/share/dpatch/dpatch-run
## 28regex_widechar.dpatch by <hesso@pool.math.tu-berlin.de>
##
## DP: Fix an overflow check to properly mask off the undesired bits
## DP: instead of casting (and accidentally sign-extending) the value.
## DP: Bugfix for #523934.
@DPATCH@
--- nvi-1.81.6.orig/regex/regcomp.c 2009-06-03 22:44:27.530015032 +0200
+++ nvi-1.81.6/regex/regcomp.c 2009-06-05 02:15:01.021006288 +0200
@@ -607,7 +607,7 @@
/* FALLTHROUGH */
default:
/* ordinary(p, c &~ BACKSL); -- Fix potential overflow */
- ordinary(p, (char)c);
+ ordinary(p, c & 0xff);
break;
}