Skip to content

Commit 9a404df

Browse files
laruencesmalyshev
authored andcommitted
Fixed bug #68740 (NULL Pointer Dereference)
(cherry picked from commit 124fb22)
1 parent 5ae20c6 commit 9a404df

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2015 PHP 5.4.40
44

5+
- Ereg:
6+
. Fixed bug #68740 (NULL Pointer Dereference). (Laruence)
7+
58
- GD:
69
. Fixed bug #68601 (buffer read overflow in gd_gif_in.c). (Remi)
710

ext/ereg/regex/regcomp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,10 @@ int c;
12841284
register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
12851285
register unsigned uc = (unsigned char)c;
12861286

1287+
if (!g->setbits) {
1288+
return(0);
1289+
}
1290+
12871291
for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
12881292
if (col[uc] != 0)
12891293
return(1);

0 commit comments

Comments
 (0)