Bug #17062: possible bad padding

From: Date: Tue, 07 May 2002 03:49:27 +0000
Subject: Bug #17062: possible bad padding
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7104@lists.php.net to get a copy of this message
From: veins@skreel.org Operating system: Unix PHP version: 4.2.0 PHP Bug Type: mcrypt related Bug description: possible bad padding I noticed something quite strange when using the mcrypt library to encrypt data. say i would encrypt $data in mode ECB: $l = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv); then decrypt it: $l = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv); It seems like the padding prevents me from using the variable correctly in some conditions. As explained in the documentation, the padding is made of '\0' and in the following example: <? exec("echo.sh $l foobar", $value, $return); exec would actually stop at $l because of the '\0' and not pass the 'foobar' arg. I don't know if this is a known bug or a "supposed" behaviour, but it is surely annoying :) -- Edit bug report at http://bugs.php.net/?id=17062&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17062&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17062&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17062&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17062&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17062&r=support Expected behavior: http://bugs.php.net/fix.php?id=17062&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17062&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17062&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17062&r=globals

« previous php.bugs (#7104) next »