-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Labels
Description
blob is not release in _libssh2_dh_secret
allocate
Line 2563 in 3ac3225
blob = malloc(public_blob_len); |
crtdbg message
Detected memory leaks!
Dumping objects ->
{190} normal block at 0x000001B22B6A3210, 1544 bytes long.
Data: <DHPB > 44 48 50 42 00 02 00 00 CB 00 EA CD C1 ED B3 E4
Object dump complete.
patch
--- libssh2/src/wincng.c 2023-03-19 11:55:01.368892072 +0900
+++ work/src/wincng.c 2023-03-19 11:54:23.872315351 +0900
@@ -2651,6 +2651,7 @@
if(agreement) {
BCryptDestroySecret(agreement);
}
+ _libssh2_wincng_safe_free(blob, public_blob_len);
if(status == STATUS_NOT_SUPPORTED &&
_libssh2_wincng.hasAlgDHwithKDF == -1) {
goto fb; /* fallback to RSA-based implementation */