]> granicus.if.org Git - php/commitdiff
- fix build, ansi c requires constant value, no expresion, even constant var
authorPierre Joye <pajoye@php.net>
Sat, 19 Nov 2011 23:09:12 +0000 (23:09 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 19 Nov 2011 23:09:12 +0000 (23:09 +0000)
ext/phar/phar.c

index e201ca50d0427512879e2e7f3d3708d4baf391a7..75f8fb5981c5d51fb46f827ac68547cd7b8188a7 100644 (file)
@@ -1570,8 +1570,8 @@ static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *a
        const char gz_magic[] = "\x1f\x8b\x08";
        const char bz_magic[] = "BZh";
        char *pos, test = '\0';
-       const int window_size = 1024;
-       char buffer[window_size + sizeof(token)]; /* a 1024 byte window + the size of the halt_compiler token (moving window) */
+       const int window_size = 1024 + sizeof(token);
+       char buffer[1024 + sizeof(token)]; /* a 1024 byte window + the size of the halt_compiler token (moving window) */
        const long readsize = sizeof(buffer) - sizeof(token);
        const long tokenlen = sizeof(token) - 1;
        long halt_offset;