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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Thu Dec 26 19:01:30 2024 UTC