FreeRDP/winpr/libwinpr
zihao.jiang a505a6cd27 Winpr/openssl: Fix digests initialization in multi-thread
SSL functions like OpenSSL_add_all_digests should be invoked at very beginning as they are not MT safe.
If not we might meet double free exception as following:

 #0  0x00007f23ddd71c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007f23ddd75028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x00007f23dddae2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #3  0x00007f23dddba55e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #4  0x00007f23dc6ecfcd in CRYPTO_free () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #5  0x00007f23dc6ef8d1 in OBJ_NAME_add () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #6  0x00007f23dc77dcd8 in EVP_add_digest () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #7  0x00007f23dc782321 in OpenSSL_add_all_digests () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #8  0x00007f23c781da28 in winpr_openssl_get_evp_md (md=4) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:52
 #9  0x00007f23c781dccb in winpr_Digest_Init (ctx=0x7f22d064d470, md=<optimized out>) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:344
 #10 0x00007f23d486139b in security_salted_mac_signature (rdp=0x7f23859f5a20, data=0x7f238542d4fb "\004\204\022\004", length=4743, encryption=<optimized out>, output=0x7
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/security.c:378
 #11 0x00007f23d488d73f in fastpath_send_update_pdu (fastpath=<optimized out>, updateCode=4 '\004', s=0x7f23859f5f40, skipCompression=true)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/fastpath.c:1076
 #12 0x00007f23d4891c4f in update_send_surface_frame_bits (context=0x7f23859f5540, cmd=0x7f22b2ffcc80, first=true, last=true, frameId=6)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/update.c:1041

Related reports: https://rt.openssl.org/Ticket/Display.html?id=2216&user=guest&pass=guest
2016-12-28 03:48:40 +08:00
..
asn1 First shot on fixing over linking 2016-03-29 18:14:34 +02:00
bcrypt First shot on fixing over linking 2016-03-29 18:14:34 +02:00
clipboard Fixed invalid const type. 2016-10-07 14:08:33 +02:00
com First shot on fixing over linking 2016-03-29 18:14:34 +02:00
comm WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
credentials Removed windows module.def files. 2016-02-29 15:18:47 +01:00
credui Removed windows module.def files. 2016-02-29 15:18:47 +01:00
crt winpr/crt: Make TestString endian-independent 2016-06-10 18:18:47 +02:00
crypto Winpr/openssl: Fix digests initialization in multi-thread 2016-12-28 03:48:40 +08:00
dsparse freerdp: UWP porting 2016-03-29 16:03:15 -04:00
environment Disabled thread local storage on iOS. 2016-10-06 13:43:10 +02:00
error Removed windows module.def files. 2016-02-29 15:18:47 +01:00
file Fixed apple file times. 2016-10-06 13:43:04 +02:00
handle Merge pull request #3163 from akallabeth/set_file_time 2016-03-02 09:43:46 +01:00
heap Removed windows module.def files. 2016-02-29 15:18:47 +01:00
input Several fixes for keyboard type 7 (japanese) 2016-02-11 21:40:50 +01:00
interlocked Warning fixes. 2016-10-06 13:43:10 +02:00
io fix race conditions, tests and some invalid return values 2016-06-01 16:26:26 +02:00
library cmake: remove some void statements and fix winpr source group 2016-06-15 13:54:31 +02:00
locale First shot on fixing over linking 2016-03-29 18:14:34 +02:00
memory First shot on fixing over linking 2016-03-29 18:14:34 +02:00
nt winpr: fix some tests 2016-06-07 17:20:56 +02:00
path Disabled thread local storage on iOS. 2016-10-06 13:43:10 +02:00
pipe winpr: fix some tests 2016-06-07 17:20:56 +02:00
pool winpr: fix win32 linking issues 2016-06-16 11:47:33 +02:00
registry freerdp: UWP porting 2016-03-29 16:03:15 -04:00
rpc Fixed function argument and variable types. 2016-10-07 14:08:54 +02:00
security First shot on fixing over linking 2016-03-29 18:14:34 +02:00
shell Fixed android build issues. 2016-02-01 15:21:07 +01:00
smartcard Fixed memory leaks. 2016-05-12 10:01:30 +02:00
sspi winpr/crypt api changes and memory leak fixes 2016-11-24 18:27:29 +01:00
sspicli winpr/synch: remove the dependency on winsock.h 2015-07-14 11:39:41 +02:00
synch winpr/wait: add missing parameters 2016-10-06 15:40:11 +02:00
sysinfo winpr: fix win32 linking issues 2016-06-16 11:47:33 +02:00
thread Thread using proper function pointer type. 2016-10-07 14:07:51 +02:00
timezone Updates time zone data to October 2016 2016-10-18 15:38:03 -04:00
utils Winpr/openssl: Fix digests initialization in multi-thread 2016-12-28 03:48:40 +08:00
winhttp winpr: always build "monolitic" 2014-07-10 11:10:58 +02:00
winsock winpr: fix win32 linking issues 2016-06-16 11:47:33 +02:00
wnd Removed windows module.def files. 2016-02-29 15:18:47 +01:00
wtsapi wtsapi: Fix issue with setting custom API table 2016-11-24 10:35:36 +01:00
CMakeLists.txt cmake: remove some void statements and fix winpr source group 2016-06-15 13:54:31 +02:00
dummy.c freerdp: various missing link dependencies and symbol exports 2013-09-03 21:48:26 -04:00
log.h Moved logging defines to main logger. 2014-09-09 16:32:04 +02:00