[php-src] PHP-8.4: Merge branch 'PHP-8.3' into PHP-8.4

From: Date: Thu, 15 May 2025 16:04:17 +0000
Subject: [php-src] PHP-8.4: Merge branch 'PHP-8.3' into PHP-8.4
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Author: George Wang (gwanglst)
Date: 2025-05-15T11:53:07-04:00

Commit: https://github.com/php/php-src/commit/72efe6dcdf5d5dd95ebab79795bd99acac31b993
Raw diff: https://github.com/php/php-src/commit/72efe6dcdf5d5dd95ebab79795bd99acac31b993.diff

Merge branch 'PHP-8.3' into PHP-8.4

Changed paths:
  M  sapi/litespeed/lsapilib.c
  M  sapi/litespeed/lscriu.c


Diff:

diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index ce97f0bbe9dc..9d8408c61339 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -2652,8 +2652,8 @@ int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
     {
     case '/':
         pAddr->sa_family = AF_UNIX;
-        strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
-                sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
+        memccpy(((struct sockaddr_un *)pAddr)->sun_path, p, 0,
+                sizeof(((struct sockaddr_un *)pAddr)->sun_path));
         return 0;
 
     case '[':
diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c
index 1eb468fdf28c..4c76a0e352a2 100644
--- a/sapi/litespeed/lscriu.c
+++ b/sapi/litespeed/lscriu.c
@@ -417,7 +417,9 @@ static int LSCRIU_Native_Dump(pid_t iPid,
     memset(&criu_native_dump, 0, sizeof(criu_native_dump));
     criu_native_dump.m_iPidToDump = iPid;
     strncpy(criu_native_dump.m_chImageDirectory, pchImagePath,
-            sizeof(criu_native_dump.m_chImageDirectory));
+            sizeof(criu_native_dump.m_chImageDirectory) - 1);
+    criu_native_dump.m_chImageDirectory[
+        sizeof(criu_native_dump.m_chImageDirectory) - 1] = '\0';
     pchLastSlash = strrchr(criu_native_dump.m_chSocketDir,'/');
     if (pchLastSlash) {
         pchLastSlash++;


Thread (1 message)

  • George Wang
« previous php.cvs (#134129) next »