Sophie

Sophie

distrib > Fedora > 16 > x86_64 > by-pkgid > 9690e75f0011bf3891fc11b8399c2d6f > files > 28

nvi-1.81.6-3.fc15.src.rpm

#! /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;
 	}