pajoye                                   Fri, 11 Dec 2009 16:07:57 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291994

Log:
- #50334, add sha support for VC6 too, not merged in trunk as we don't support 
vc6 there

Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512 prefix
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
    U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c    2009-12-11 
15:57:01 UTC (rev 291993)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c    2009-12-11 
16:07:57 UTC (rev 291994)
@@ -336,8 +336,15 @@
 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int 
buflen)
 {
 #ifdef PHP_WIN32
+# if _MSC <= 1300
+#  pragma pack(push, 16)
+       unsigned char alt_result[32];
+       unsigned char temp_result[32];
+#  pragma pack(pop)
+# else
        __declspec(align(32)) unsigned char alt_result[32];
        __declspec(align(32)) unsigned char temp_result[32];
+# endif
 #else
        unsigned char alt_result[32]
        __attribute__ ((__aligned__ (__alignof__ (uint32_t))));

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c    2009-12-11 
15:57:01 UTC (rev 291993)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c    2009-12-11 
16:07:57 UTC (rev 291994)
@@ -364,8 +364,15 @@
 char *
 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int 
buflen) {
 #ifdef PHP_WIN32
+# if _MSC <= 1300
+#  pragma pack(push, 16)
+       unsigned char alt_result[64];
+       unsigned char temp_result[64];
+#  pragma pack(pop)
+# else
        __declspec(align(64)) unsigned char alt_result[64];
        __declspec(align(64)) unsigned char temp_result[64];
+# endif
 #else
        unsigned char alt_result[64]
                __attribute__ ((__aligned__ (__alignof__ (uint64_t))));

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

Reply via email to