php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #63002
Patch wincache-1.3.4-500-error-updated.patch revision 2012-10-09 02:59 UTC by pvasilevich at parallels dot com
Patch wincache-1.3.4-500-error revision 2012-09-03 03:24 UTC by pvasilevich at parallels dot com

Patch wincache-1.3.4-500-error for WinCache Bug #63002

Patch version 2012-09-03 03:24 UTC

Return to Bug #63002 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: pvasilevich@parallels.com

Index: wincache_opcopy.c
===================================================================
--- wincache_opcopy.c	(revision 327371)
+++ wincache_opcopy.c	(working copy)
@@ -490,18 +490,18 @@
         dprintimportant("failure %d in copy_zval_array", result);
         _ASSERT(result > WARNING_COMMON_BASE);
 
-        /* First, if we allocated any zval's in the array, free them first */
-        for (index = 0; index < count; index++)
-        {
-            if (prgnewz[index])
-            {
-                free_zval(popcopy, prgnewz[index], DO_FREE);
-            }
-        }
-
         /* Finally, free the array itself */
         if(prgnewz != NULL)
         {
+			/* First, if we allocated any zval's in the array, free them first */
+			for (index = 0; index < count; index++)
+			{
+				if (prgnewz[index])
+				{
+					free_zval(popcopy, prgnewz[index], DO_FREE);
+				}
+			}
+
             if(allocated == 1)
             {
                 OFREE(popcopy, prgnewz);
@@ -1336,8 +1336,15 @@
     {
         zend_literal *src, *dst, *end;
 
-        src = poldopa->literals;
-        dst = pnewopa->literals = (zend_literal*) OMALLOC(popcopy, (sizeof(zend_literal) * poldopa->last_literal));
+        pnewopa->literals = (zend_literal*) OMALLOC(popcopy, (sizeof(zend_literal) * poldopa->last_literal));
+		if (pnewopa->literals == NULL)
+		{
+			result = popcopy->oomcode;
+			goto Finished;
+		}
+
+		src = poldopa->literals;
+		dst = pnewopa->literals;
         end = src + poldopa->last_literal;
         while (src < end)
         {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 02:01:30 2024 UTC