php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60798
Patch problem-patch-in-5.3.9.diff revision 2012-01-19 03:09 UTC by ktk at enterprise dot bidmc dot harvard dot edu

Patch problem-patch-in-5.3.9.diff for OpenSSL related Bug #60798

Patch version 2012-01-19 03:09 UTC

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

Developer: ktk@enterprise.bidmc.harvard.edu

diff -urN php-5.3.8/ext/openssl/openssl.c php-5.3.9/ext/openssl/openssl.c
--- php-5.3.8/ext/openssl/openssl.c	2011-07-25 07:42:53.000000000 -0400
+++ php-5.3.9/ext/openssl/openssl.c	2012-01-01 08:15:04.000000000 -0500
@@ -2,7 +2,7 @@
    +----------------------------------------------------------------------+
    | PHP Version 5                                                        |
    +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2011 The PHP Group                                |
+   | Copyright (c) 1997-2012 The PHP Group                                |
    +----------------------------------------------------------------------+
    | This source file is subject to version 3.01 of the PHP license,      |
    | that is bundled with this package in the file LICENSE, and is        |
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: openssl.c 313665 2011-07-25 11:42:53Z felipe $ */
+/* $Id: openssl.c 321634 2012-01-01 13:15:04Z felipe $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -4713,7 +4713,9 @@
 		EVP_CIPHER_CTX_set_key_length(&cipher_ctx, password_len);
 	}
 	EVP_EncryptInit_ex(&cipher_ctx, NULL, NULL, key, (unsigned char *)iv);
-	EVP_EncryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len);
+	if (data_len > 0) {
+		EVP_EncryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len);
+	}
 	outlen = i;
 	if (EVP_EncryptFinal(&cipher_ctx, (unsigned char *)outbuf + i, &i)) {
 		outlen += i;
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 23:03:36 2021 UTC