php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3323 mcrypt inserting extra null values into string
Submitted: 2000-01-26 15:24 UTC Modified: 2000-01-27 13:27 UTC
From: peter at knowpost dot com Assigned:
Status: Closed Package: mcrypt related
PHP Version: 4.0 Latest CVS (26/01/2000) OS: Debian/2.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: peter at knowpost dot com
New email:
PHP Version: OS:

 

 [2000-01-26 15:24 UTC] peter at knowpost dot com
In netscape (and telnet) the following code:

<?php echo "This is a test " . mcrypt(MCRYPT_RC6, "SECRET KEY", mcrypt_ecb(MCRYPT_RC6, "SECRET KEY", "string", MCRYPT_ENCRYPT), MCRYPT_DECRYPT) . " lets see if it works."; ?>

produces the output:
This is a test string

instead of the expected:
This is a test string lets see if it works.

Strangely enough, the full string appears in Internet explorer.  In my experience this points to a null value in the middle of the string.

PHP compiled with:
./configure --with-mysql --with-apxs=/usr/apache/bin/apxs --enable-trans-sid --enable-track-vars --with-mcrypt --with-aspell --with-mm --enable-inline-optimization --with-xml=/home/kovacsp/src/expat
Using apache 1.3.9

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-27 13:27 UTC] peter at knowpost dot com
On further research this I discovered this is a non-bug.  It happened because I was using small amounts of data.  The offending characters were removed and all is well.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 10:01:28 2024 UTC