[openssl-dev] 答复: [openssl.org #4231] bug openssl rc4 overflow
Salz, Rich via RT
rt at openssl.org
Wed Jan 13 16:40:43 UTC 2016
There is something unusual in your local environment.
; cat a.c
#include <string.h>
#include <stdio.h>
#include<openssl/rc4.h>
int main()
{
char code[64]={0};
char outbuffer[64];
int codelen = sizeof (code);
RC4_KEY rc4_key;
strcpy(code,"This is secrect");
RC4_set_key(&rc4_key,7,(unsigned char *)"zenraoli");
RC4(&rc4_key,codelen,(unsigned char *)code,outbuffer);
memset(code,0,sizeof(code));
RC4_set_key(&rc4_key,7,(unsigned char *)"zenraoli");
RC4(&rc4_key,codelen,outbuffer,(unsigned char *)code);
printf("|%s|\n", code);
return 0;
}
; gcc a.c -lcrypto
; ./a.out
|This is secrect|
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod
More information about the openssl-dev
mailing list