Hello:

I compiled openssl-0.9.5 for Visual C++,following the
instructions of Andrew Gray, and everything looks work
fine; but I encounter a problem with the BIO functions
that I can resolve. Here is the code:

#include <stdio.h>
#include <openssl/ssl.h>

int main() {

pBioErr= BIO_new_fp(stderr,BIO_NOCLOSE);

fwrite("Hello world\n", 11, 1, pBioErr->ptr);
BIO_printf(pBioErr, "Hello, world\n");

return(1);
};

The program crash in BIO_printf(...), with the next
call stack:

NTDLL! 77f7ce4c()
NTDLL! 77f77586()
fwrite(const void * 0x0012f70c, unsigned int 6,
unsigned int 1, _iobuf * 0x00422a98) line 72 + 9 bytes
file_write(bio_st * 0x009c1fb0, char * 0x0012f70c, int
6) line 172 + 23 bytes
BIO_write(bio_st * 0x009c1fb0, const char *
0x0012f70c, int 6) line 197 + 20 bytes
BIO_printf(bio_st * 0x009c1fb0) line 95 + 20 bytes
main(int 1, char * * 0x00ad0e90) line 25 + 14 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! 77f1b9ea()


And the debug window display this:

Loaded 'D:\WINNT\System32\ntdll.dll', no matching
symbolic information found.
Loaded symbols for
'C:\Pruebas\openssl-0.9.5\out32dll\Debug\libeay32.dll'
Loaded 'D:\WINNT\system32\WSOCK32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\KERNEL32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\WS2_32.DLL', no matching
symbolic information found.
Loaded symbols for 'D:\WINNT\system32\MSVCRT.DLL'
Loaded 'D:\WINNT\system32\USER32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\GDI32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\ADVAPI32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\RPCRT4.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\WS2HELP.DLL', no matching
symbolic information found.
Loaded symbols for 'D:\WINNT\system32\MSVCRTD.DLL'
First-chance exception in leaks.exe (NTDLL.DLL):
0xC0000005: Access Violation.

I  think its very strange that the same function call
(fwrite) with the same parameters that works in
main(), fails in file_write(). Maybe is a problem with
the settings of the compilation, because the utility
applications (openssl, etc) works ok. 

Anyone could help me?
Thanks in advance.



_______________________________________________________________
Do You Yahoo!?
Consiga gratis su direcci�n @yahoo.es en http://correo.yahoo.es
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to