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);
|