Bug #14162 Updated: wrong init with mcrypt_generic_init crashes php

From: Date: Sat, 15 Dec 2001 13:21:51 +0000
Subject: Bug #14162 Updated: wrong init with mcrypt_generic_init crashes php
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-73907@lists.php.net to get a copy of this message
ID: 14162 Updated by: derick Reported By: alberty@neptunelabs.com Old Status: Assigned Status: Closed Bug Type: mcrypt related Operating System: i686-pc-linux-gnu PHP Version: 4.0CVS-2001-11-21 Old Assigned To: derick Assigned To: New Comment: Fixed in CVS. Please note that the return value as noted in the PHP Manual was not correct. This function returns a negative value on error. BTW, encrypting without password is not very smart, so speicifying FALSE there makes no sense. You can try a snapshot from snaps.php.net later toda, to see if it is really fixed (ie, it doesn't crash anymore). Derick Previous Comments: ------------------------------------------------------------------------ [2001-11-21 11:23:17] alberty@neptunelabs.com Hi, php crashes with libmcrypt (ive test it with 2.4.17) with the follow php script. The problem is the complete wrong initalising with mcrypt_generic_init. The mcrypt_generic_init results -3 and mcrypt_generic crashes. <?php $stream='Hello World!'; $td = @mcrypt_module_open (MCRYPT_ARCFOUR , '', MCRYPT_MODE_STREAM, ''); if ($td!=false){ $result=@mcrypt_generic_init ($td, false, false); if ($result!=-1){ $stream = mcrypt_generic ($td, $stream); mcrypt_generic_deinit ($td); } } echo $stream; ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14162&edit=1

« previous php.dev (#73907) next »