X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fcryptlib.c;h=524daf037d108dcc7a86fcb2c7eec07969c8ddfc;hb=ada35f9c2c4afe5eb003695e08908eb3c7644860;hp=8a8fac3d13a3b6e910d4ef3ea0d9cd883a291183;hpb=2667162d33ab21b6477f224040106c1d460e9249;p=openssl.git diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 8a8fac3d13..524daf037d 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -293,8 +293,12 @@ void OPENSSL_showfatal (const char *fmta,...) if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL && GetFileType(h)!=FILE_TYPE_UNKNOWN) { /* must be console application */ + int len; + DWORD out; + va_start (ap,fmta); - vfprintf (stderr,fmta,ap); + len=_vsnprintf((char *)buf,sizeof(buf),fmt,ap); + WriteFile(h,buf,len<0?sizeof(buf):(DWORD)len,&out,NULL); va_end (ap); return; } @@ -375,4 +379,6 @@ void OpenSSLDie(const char *file,int line,const char *assertion) #endif } +#ifndef OPENSSL_FIPSCANISTER void *OPENSSL_stderr(void) { return stderr; } +#endif