cvs: php4 /ext/mcrypt mcrypt.c

From: Date: Wed, 25 Oct 2000 18:27:55 +0000
Subject: cvs: php4 /ext/mcrypt mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2260@lists.php.net to get a copy of this message
nmav Wed Oct 25 11:27:55 2000 EDT Modified files: /php4/ext/mcrypt mcrypt.c Log: Corrected some checks for errors. Index: php4/ext/mcrypt/mcrypt.c diff -u php4/ext/mcrypt/mcrypt.c:1.41 php4/ext/mcrypt/mcrypt.c:1.42 --- php4/ext/mcrypt/mcrypt.c:1.41 Tue Aug 15 07:58:21 2000 +++ php4/ext/mcrypt/mcrypt.c Wed Oct 25 11:27:55 2000 @@ -134,7 +134,7 @@ nsize = nr * bsize #define MCRYPT_CHECK_TD_CPY \ - if(td == -1) { \ + if(td < 0) { \ php_error(E_WARNING, MCRYPT_FAILED); \ RETURN_FALSE; \ } \ @@ -613,7 +613,7 @@ MCRYPT_GET_TD_ARG - if (mcrypt_module_close (td) == -1) { + if (mcrypt_module_close (td) < 0) { php_error (E_WARNING, "could not close module"); RETURN_FALSE } else { @@ -633,7 +633,7 @@ MCRYPT_GET_TD_ARG - if (mcrypt_generic_end (td) == -1) { + if (mcrypt_generic_end (td) < 0) { php_error (E_WARNING, "could not terminate encryption specifier"); RETURN_FALSE } @@ -1294,7 +1294,7 @@ memcpy (data_s, (*data)->value.str.val, (*data)->value.str.len); } - if (mcrypt_generic_init (td, key_s, use_key_length, iv_s) == -1) { + if (mcrypt_generic_init (td, key_s, use_key_length, iv_s) < 0) { php_error (E_ERROR, "generic_init failed"); } if (dencrypt == MCRYPT_ENCRYPT)

« previous php.cvs (#2260) next »