File: CVE-2015-TEMP-1.patch

package info (click to toggle)
php5 5.3.3.1-7%2Bsqueeze29
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 123,520 kB
  • ctags: 55,742
  • sloc: ansic: 633,963; php: 19,620; sh: 11,344; xml: 5,816; cpp: 2,400; yacc: 1,745; exp: 1,514; makefile: 1,019; pascal: 623; awk: 537; sql: 22
file content (26 lines) | stat: -rw-r--r-- 846 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 124fb22a13fafa3648e4e15b4f207c7096d8155e Mon Sep 17 00:00:00 2001
From: Xinchen Hui <laruence@php.net>
Date: Thu, 8 Jan 2015 16:09:02 +0800
Subject: [PATCH] Fixed bug #68739 #68740

20150202, ta, Don't use the fix for #68739

---
 ext/ereg/regex/regcomp.c | 4 ++++
 1 files changed, 4 insertions(+)

Index: php5-5.3.3/ext/ereg/regex/regcomp.c
===================================================================
--- php5-5.3.3.orig/ext/ereg/regex/regcomp.c	2015-01-21 13:30:47.000000000 +0100
+++ php5-5.3.3/ext/ereg/regex/regcomp.c	2015-01-21 13:30:47.000000000 +0100
@@ -1276,6 +1276,10 @@
 	register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
 	register unsigned uc = (unsigned char)c;
 
+	if (!g->setbits) {
+		return(0);
+	}
+
 	for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
 		if (col[uc] != 0)
 			return(1);