On Thu, 17 May 2001, Andi Gutmans wrote:
> Sascha,
>
> Can you please check this out? It should probably be fixed for 4.0.6.
The code he pasted gives me a nice segfault:
Program received signal SIGSEGV, Segmentation fault.
permute (inblock=0x81ac1e4 "6866206b\204Ì\217*", perm=0x1980,
outblock=0xbfffe424 "") at tripledes.c:628
628 *ob++ |= *p++ | *q++;
(gdb) bt
#0 permute (inblock=0x81ac1e4 "6866206b\204Ì\217*", perm=0x1980,
outblock=0xbfffe424 "") at tripledes.c:628
#1 0x405b32da in tripledes_LTX__mcrypt_encrypt (key=0x0,
block=0x81ac1e4 "6866206b\204Ì\217*") at tripledes.c:319
#2 0x400189da in ecb_LTX__mcrypt (ign=0x0, plaintext=0x81ac1e4, len=8,
blocksize=8, akey=0x0, func=0x405b32ac
<tripledes_LTX__mcrypt_encrypt>,
func2=0x405b37d8 <tripledes_LTX__mcrypt_decrypt>) at ecb.c:55
#3 0x40161a09 in mcrypt (td=0x8235ac0, buf=0x0, a=0x81ac1e4, b=8)
at mcrypt_modules.c:377
#4 0x401610ee in mcrypt_generic (td=0x8235ac0, plaintext=0x81ac1e4,
len=8)
at mcrypt.c:152
#5 0x80743d8 in php_if_mcrypt_generic (ht=2, return_value=0x82358a4,
this_ptr=0x0, return_value_used=1) at mcrypt.c:518
#6 0x814f211 in execute (op_array=0x8203a24) at ./zend_execute.c:1504
#7 0x8114b3b in zend_execute_scripts (type=8, file_count=3) at zend.c:748
#8 0x8066fec in php_execute_script (primary_file=0xbffffac4) at
main.c:1206
#9 0x8065291 in main (argc=1, argv=0xbffffb24) at cgi_main.c:717
#10 0x402fb9cb in __libc_start_main (main=0x8064bf4 <main>, argc=1,
argv=0xbffffb24, init=0x8062e88 <_init>, fini=0x8154b2c <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffb1c)
at ../sysdeps/generic/libc-start.c:92
It seems to me that a NULL pointer as key is passed to mcrypt.
I'll have a look at the code later this evening.
Derick
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]