]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 30 Dec 2019 14:17:03 +0000 (15:17 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 30 Dec 2019 14:17:41 +0000 (15:17 +0100)
* PHP-7.3:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR

1  2 
NEWS
ext/opcache/shared_alloc_win32.c

diff --cc NEWS
index 464ac3d885b76b180f6ba6f3c81b6e4ad46c8602,eb1d2c4edd0931831c8a6e4eb1736cbd945516cd..d99c3d5a2d01f3acf190926dd4b6919527269f32
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -28,12 -22,7 +28,13 @@@ PH
    . Fixed bug #79029 (Use After Free's in XMLReader / XMLWriter). (Laruence)
  
  - OPcache:
 +  . Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS). (Dmitry)
 +  . Fixed bug #78950 (Preloading trait method with static variables). (Nikita)
 +  . Fixed bug #78903 (Conflict in RTD key for closures results in crash).
 +    (Nikita)
 +  . Fixed bug #78986 (Opcache segfaults when inheriting ctor from immutable
 +    into mutable class). (Nikita)
+   . Fixed bug #79040 (Warning Opcode handlers are unusable due to ASLR). (cmb)
  
  - Pcntl:
    . Fixed bug #78402 (Converting null to string in error message is bad DX).
index 35abe367cfd11f12f1052a887861105f37307361,3ae65382f4f7e3f685a30a13d4f28e4f52642681..d2c31dd63b04a7b262b62e26854341a53961c1e0
@@@ -24,8 -23,8 +24,9 @@@
  #include "zend_shared_alloc.h"
  #include "zend_accelerator_util_funcs.h"
  #include "zend_execute.h"
+ #include "SAPI.h"
  #include "tsrm_win32.h"
 +#include "win32/winutil.h"
  #include <winbase.h>
  #include <process.h>
  #include <LMCONS.H>
@@@ -68,24 -79,38 +69,24 @@@ static void zend_win_error_message(int 
  
  static char *create_name_with_username(char *name)
  {
-       static char newname[MAXPATHLEN + 32 + 4 + 1 + 32];
-       snprintf(newname, sizeof(newname) - 1, "%s@%.32s@%.32s", name, accel_uname_id, accel_system_id);
 -      static char newname[MAXPATHLEN + UNLEN + 4 + 1 + 32 + 21];
 -      char *uname;
 -
 -      uname = php_win32_get_username();
 -      if (!uname) {
 -              return NULL;
 -      }
 -      snprintf(newname, sizeof(newname) - 1, "%s@%s@%.20s@%.32s", name, uname, sapi_module.name, ZCG(system_id));
 -
 -      free(uname);
++      static char newname[MAXPATHLEN + 32 + 4 + 1 + 32 + 21];
++      snprintf(newname, sizeof(newname) - 1, "%s@%.32s@%.20s@%.32s", name, accel_uname_id, sapi_module.name, accel_system_id);
  
        return newname;
  }
  
  static char *get_mmap_base_file(void)
  {
-       static char windir[MAXPATHLEN+ 32 + 3 + sizeof("\\\\@") + 1 + 32];
 -      static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@") + 1 + 32 + 21];
 -      char *uname;
++      static char windir[MAXPATHLEN+ 32 + 3 + sizeof("\\\\@") + 1 + 32 + 21];
        int l;
  
 -      uname = php_win32_get_username();
 -      if (!uname) {
 -              return NULL;
 -      }
        GetTempPath(MAXPATHLEN, windir);
        l = strlen(windir);
        if ('\\' == windir[l-1]) {
                l--;
        }
 -      snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.20s@%.32s", ACCEL_FILEMAP_BASE, uname, sapi_module.name, ZCG(system_id));
  
-       snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%.32s@%.32s", ACCEL_FILEMAP_BASE, accel_uname_id, accel_system_id);
 -      free(uname);
++      snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%.32s@%.20s@%.32s", ACCEL_FILEMAP_BASE, accel_uname_id, sapi_module.name, accel_system_id);
  
        return windir;
  }