Skip to content

Commit d17ed88

Browse files
committed
Merge branch 'master' into sccp
* master: Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()). Fixed bug #72324 (imap_mailboxmsginfo() return wrong size) Fix redefine warnings Expand sb's name and capitalize my own Write the URL on a new line, so that it is easier copyable
2 parents d90805a + 29653da commit d17ed88

File tree

6 files changed

+39
-7
lines changed

6 files changed

+39
-7
lines changed

NEWS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ PHP NEWS
1313
- GD:
1414
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
1515

16+
- IMAP:
17+
. Fixed bug #72324 (imap_mailboxmsginfo() return wrong size).
18+
(ronaldpoon at udomain dot com dot hk, Kalle)
19+
1620
- OpenSSL:
1721
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
1822
(Stas)
1923

24+
- PCRE:
25+
. Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()).
26+
(Dmitry)
27+
2028
06 Jul 2017, PHP 7.2.0alpha3
2129

2230
- Core:
@@ -63,7 +71,7 @@ PHP NEWS
6371
22 Jun 2017, PHP 7.2.0alpha2
6472

6573
- Core:
66-
. Change PHP_OS_FAMILY value from "OSX" to "Darwin". (sb, kalle)
74+
. Change PHP_OS_FAMILY value from "OSX" to "Darwin". (Sebastian, Kalle)
6775

6876
- GD:
6977
. Fixed bug #74744 (gd.h: stdarg.h include missing for va_list use in

ext/imap/php_imap.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,7 +2601,8 @@ PHP_FUNCTION(imap_mailboxmsginfo)
26012601
zval *streamind;
26022602
pils *imap_le_struct;
26032603
char date[100];
2604-
unsigned int msgno, unreadmsg, deletedmsg, msize;
2604+
unsigned long msgno;
2605+
zend_ulong unreadmsg = 0, deletedmsg = 0, msize = 0;
26052606

26062607
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
26072608
return;
@@ -2614,10 +2615,6 @@ PHP_FUNCTION(imap_mailboxmsginfo)
26142615
/* Initialize return object */
26152616
object_init(return_value);
26162617

2617-
unreadmsg = 0;
2618-
deletedmsg = 0;
2619-
msize = 0;
2620-
26212618
for (msgno = 1; msgno <= imap_le_struct->imap_stream->nmsgs; msgno++) {
26222619
MESSAGECACHE * cache = mail_elt (imap_le_struct->imap_stream, msgno);
26232620
mail_fetchstructure (imap_le_struct->imap_stream, msgno, NIL);

ext/imap/php_imap.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@
3535
#if HAVE_IMAP
3636

3737
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
38+
39+
/* For now these appear on Windows, remove this check if it appears outside */
40+
# ifdef PHP_WIN32
41+
/* Undefine these LOG defines to avoid warnings */
42+
# undef LOG_EMERG
43+
# undef LOG_CRIT
44+
# undef LOG_ERR
45+
# undef LOG_WARNING
46+
# undef LOG_NOTICE
47+
# undef LOG_DEBUG
48+
49+
/* c-client also redefines its own ftruncate */
50+
# undef ftruncate
51+
# endif
52+
3853
/* these are used for quota support */
3954
# include "c-client.h" /* includes mail.h and rfc822.h */
4055
# include "imap4r1.h" /* location of c-client quota functions */

ext/pcre/php_pcre.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,10 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
826826
#ifdef HAVE_PCRE_JIT_SUPPORT
827827
if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT)
828828
&& no_utf_check && !g_notempty) {
829+
if (start_offset < 0 || start_offset > subject_len) {
830+
pcre_handle_exec_error(PCRE_ERROR_BADOFFSET);
831+
break;
832+
}
829833
count = pcre_jit_exec(pce->re, extra, subject, (int)subject_len, (int)start_offset,
830834
no_utf_check|g_notempty, offsets, size_offsets, jit_stack);
831835
} else

ext/pcre/tests/bug74873.phpt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--TEST--
2+
Bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match())
3+
--FILE--
4+
<?php
5+
var_dump(preg_match('/\S+/', 'foo bar', $matches, 0, 99999));
6+
?>
7+
--EXPECT--
8+
bool(false)

win32/build/confutils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3389,7 +3389,7 @@ function check_binary_tools_sdk()
33893389

33903390
/* Basic test, extend by need. */
33913391
if (BIN_TOOLS_SDK_VER_MAJOR < 2) {
3392-
ERROR("Incompatible binary tools version. Please consult https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2");
3392+
ERROR("Incompatible binary tools version. Please consult\r\nhttps://wiki.php.net/internals/windows/stepbystepbuild_sdk_2");
33933393
}
33943394
}
33953395

0 commit comments

Comments
 (0)