php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61036
Patch change-4byte-to-dynamic revision 2012-02-10 06:04 UTC by chibisuke at web dot de

Patch change-4byte-to-dynamic for bcompiler Bug #61036

Patch version 2012-02-10 06:04 UTC

Return to Bug #61036 | Download this patch
Patch Revisions:

Developer: chibisuke@web.de

--- php_bcompiler.c.orig        2012-02-10 05:55:42.000000000 +0100
+++ php_bcompiler.c     2012-02-10 06:02:29.000000000 +0100
@@ -856,7 +856,7 @@
                return;
        }

-       pos = (long) ((strlen(BCOMPILER_MAGIC_HEADER)+4) * -1); /* +4 cause we need to read the string size */
+       pos = (long) ((strlen(BCOMPILER_MAGIC_HEADER)+BCOMPILERG(bcompiler_stdsize)[BCSI_int]) * -1); /* +size of int cause we need to read the string size */
        BCOMPILER_DEBUG(("move to start: %d\n", pos));
        php_stream_seek(stream, pos , SEEK_END);
        BCOMPILER_DEBUG(("done seek - try deserialize\n"));
@@ -874,7 +874,7 @@
 #endif

        /* now read the length */
-       pos = pos - 4;
+       pos = pos - BCOMPILERG(bcompiler_stdsize)[BCSI_int];
        BCOMPILER_DEBUG(("move to end: %d\n", pos));
        php_stream_seek(stream, pos , SEEK_END);
        DESERIALIZE_SCALAR(&pos, int);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 09:01:32 2024 UTC