Bug #2796 Updated: incorrect crypt() result when, length of salt < PHP3_MAX_SALT_LEN
| From: | sander@php.net | Date: | Sun, 16 Jun 2002 13:01:20 +0000 |
| Subject: | Bug #2796 Updated: incorrect crypt() result when, length of salt < PHP3_MAX_SALT_LEN | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10726@lists.php.net to get a copy of this message | ||
ID: 2796
Updated by: sander@php.net
Reported By: vova@express.ru
-Status: Open
+Status: Bogus
Bug Type: Other
Operating System: FreeBSD-3.3
PHP Version: 3.0.12
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[1999-11-23 07:51:05] vova@express.ru
<?
echo crypt("password", "X");
?>
patch: (need to concentate cutted lines)
--- functions/crypt.c.orig Tue Oct 26 03:05:36 1999
+++ functions/crypt.c Tue Oct 26 03:08:21 1999
@@ -147,6 +147,7 @@
}
convert_to_string(arg2);
memcpy(salt,arg2->value.str.val,
MIN(PHP3_MAX_SALT_LEN,arg2->value.str.len));
+
salt[MIN(PHP3_MAX_SALT_LEN,arg2->value.str.len)] = '\0';
break;
default:
WRONG_PARAM_COUNT;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=2796&edit=1