iliaa           Thu Mar 19 23:11:54 2009 UTC

  Modified files:              
    /php-src/ext/mbstring/oniguruma     regint.h 
    /php-src/ext/sysvshm        sysvshm.c 
  Log:
  
  MFB: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regint.h?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regint.h
diff -u php-src/ext/mbstring/oniguruma/regint.h:1.6 
php-src/ext/mbstring/oniguruma/regint.h:1.7
--- php-src/ext/mbstring/oniguruma/regint.h:1.6 Sat Jul 12 23:54:30 2008
+++ php-src/ext/mbstring/oniguruma/regint.h     Thu Mar 19 23:11:54 2009
@@ -232,7 +232,7 @@
 #define NULL_UCHARP                   ((UChar* )0)
 
 #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
-#define WORD_ALIGNMENT_SIZE       SIZEOF_INT
+#define WORD_ALIGNMENT_SIZE       SIZEOF_LONG
 
 #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
   (pad_size) = WORD_ALIGNMENT_SIZE \
http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.87&r2=1.88&diff_format=u
Index: php-src/ext/sysvshm/sysvshm.c
diff -u php-src/ext/sysvshm/sysvshm.c:1.87 php-src/ext/sysvshm/sysvshm.c:1.88
--- php-src/ext/sysvshm/sysvshm.c:1.87  Tue Mar 17 23:22:05 2009
+++ php-src/ext/sysvshm/sysvshm.c       Thu Mar 19 23:11:54 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: sysvshm.c,v 1.87 2009/03/17 23:22:05 iliaa Exp $ */
+/* $Id: sysvshm.c,v 1.88 2009/03/19 23:11:54 iliaa Exp $ */
 
 /* This has been built and tested on Linux 2.2.14 
  *
@@ -357,7 +357,7 @@
        long total_size;
        long shm_varpos;
 
-       total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 
4-byte alligment */
+       total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) 
* sizeof(long) + sizeof(long); /* long alligment */
 
        if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) {
                php_remove_shm_data(ptr, shm_varpos);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to