From:             coditza at cluj dot astral dot ro
Operating system: windows
PHP version:      4.4.2
PHP Bug Type:     mcrypt related
Bug description:  last part of the string is lost at decoding

Description:
------------
If the lenght of the encoded string is a multiple of chipher block size,
the last blocksize part of the chipher is lost at decoding.

Reproduce code:
---------------
Use the script at: http://www.coada.net/develop/crypt.phps to produce an
encoded file, then, from shell:

openssl bf-cbc -in out.dat -out out.dec -K
000102030405060708090a0b0c0d0e0f -iv 0102030405060708 -d

and

cat out.dec

Expected result:
----------------
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Actual result:
--------------
bad decrypt
31976:error:06065064:digital envelope routines:EVP_DecryptFinal:bad
decrypt:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/evp/evp_enc.c:450:
[EMAIL PROTECTED] cat out.dec
[EMAIL PROTECTED]


-- 
Edit bug report at http://bugs.php.net/?id=37595&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37595&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37595&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37595&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37595&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37595&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37595&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37595&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37595&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37595&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37595&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37595&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37595&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37595&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37595&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37595&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37595&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37595&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37595&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37595&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37595&r=mysqlcfg

Reply via email to