Skip to content

Commit 394e6ab

Browse files
committed
修复了dropbear退出的问题,修复了wolfssl的sha值问题
1 parent 0a42504 commit 394e6ab

3 files changed

Lines changed: 47 additions & 4 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
diff --git a/common-session.c b/common-session.c
2+
index 1dd6a0d..3755cc4 100644
3+
--- a/common-session.c
4+
+++ b/common-session.c
5+
@@ -321,22 +321,22 @@ void session_cleanup() {
6+
buf_free(dequeue(&ses.writequeue));
7+
}
8+
9+
- m_free(ses.newkeys);
10+
-#ifndef DISABLE_ZLIB
11+
- if (ses.keys->recv.zstream != NULL) {
12+
- if (inflateEnd(ses.keys->recv.zstream) == Z_STREAM_ERROR) {
13+
- dropbear_exit("Crypto error");
14+
- }
15+
- m_free(ses.keys->recv.zstream);
16+
- }
17+
-#endif
18+
-
19+
- m_free(ses.remoteident);
20+
- // m_free(ses.authstate.pw_dir);
21+
- m_free(ses.authstate.pw_name);
22+
- m_free(ses.authstate.pw_shell);
23+
- m_free(ses.authstate.pw_passwd);
24+
- m_free(ses.authstate.username);
25+
+// m_free(ses.newkeys);
26+
+// #ifndef DISABLE_ZLIB
27+
+// if (ses.keys->recv.zstream != NULL) {
28+
+// if (inflateEnd(ses.keys->recv.zstream) == Z_STREAM_ERROR) {
29+
+// dropbear_exit("Crypto error");
30+
+// }
31+
+// m_free(ses.keys->recv.zstream);
32+
+// }
33+
+// #endif
34+
+
35+
+// m_free(ses.remoteident);
36+
+// // m_free(ses.authstate.pw_dir);
37+
+// m_free(ses.authstate.pw_name);
38+
+// m_free(ses.authstate.pw_shell);
39+
+// m_free(ses.authstate.pw_passwd);
40+
+// m_free(ses.authstate.username);
41+
#endif
42+
43+
cleanup_buf(&ses.session_id);

repo/packages/d/dropbear/xmake.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ do
3131

3232
add_patches("2022.83",path.join(os.scriptdir(), "patches", "2022.83", "01_adapt_smart.diff"),
3333
"b15127fcee613fe7771d8f8dcc93b0ea3739ac6b3a2b06c99d51456fa8f81606")
34-
-- add_patches("2022.83",path.join(os.scriptdir(), "patches", "2022.83", "02_adapt_user.diff"),
35-
-- "3f6ce9984e13f01d58839b8ca14bcf10ca62fbd9780ac7ea39b76238ab27fde7")
36-
34+
add_patches("2022.83",path.join(os.scriptdir(), "patches", "2022.83", "03_fix_memory.diff"),
35+
"a12b7ee10502d47994c089e39b5b30640516971323eed9af93cdf96bcdc7815d")
36+
3737
on_load(function(package)
3838
package:add("deps", "zlib", {debug = package:config("debug"), configs = {shared = package:config("shared")}})
3939
end)

repo/packages/w/wolfssl/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ do
2626
set_description("Providing secure communication for IoT, smart grid, connected home, automobiles, routers, applications, games, IP, mobile phones, the cloud, and more.")
2727

2828
add_urls("https://github.com/wolfSSL/wolfssl/archive/refs/tags/$(version)-stable.tar.gz")
29-
add_versions("v5.6.3","2E74A397FA797C2902D7467D500DE904907666AFB4FF80F6464F6EFD5AFB114A")
29+
add_versions("v5.6.3","2e74a397fa797c2902d7467d500de904907666afb4ff80f6464f6efd5afb114a")
3030

3131
add_configs("shared", {
3232
description = "Build shared library.",

0 commit comments

Comments
 (0)