diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-11-08 15:18:05 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-08 15:18:05 -0600 |
commit | 5600364f4aeaa078508b3e6aba030e6232c55b8f (patch) | |
tree | 05c3a0ace924040b5a7e8db6ed0ff70cbac04127 | |
parent | 80f72983f0577eb69a88500a65fd9a6dd9ae2c2b (diff) | |
download | busybox-w32-packaging-5600364f4aeaa078508b3e6aba030e6232c55b8f.tar.gz busybox-w32-packaging-5600364f4aeaa078508b3e6aba030e6232c55b8f.tar.bz2 busybox-w32-packaging-5600364f4aeaa078508b3e6aba030e6232c55b8f.zip |
Change some more out of memory errors
-rw-r--r-- | libressl.patch | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libressl.patch b/libressl.patch index 3185e93..dea23ad 100644 --- a/libressl.patch +++ b/libressl.patch | |||
@@ -135,7 +135,7 @@ index 9f1dd67ec..7e8da6df2 100644 | |||
135 | static void tls_xwrite(tls_state_t *tls, int len) | 135 | static void tls_xwrite(tls_state_t *tls, int len) |
136 | { | 136 | { |
137 | diff --git a/networking/wget.c b/networking/wget.c | 137 | diff --git a/networking/wget.c b/networking/wget.c |
138 | index 6a64836fb..cb625b9fc 100644 | 138 | index 6a64836fb..334becc47 100644 |
139 | --- a/networking/wget.c | 139 | --- a/networking/wget.c |
140 | +++ b/networking/wget.c | 140 | +++ b/networking/wget.c |
141 | @@ -689,6 +689,7 @@ static void reset_beg_range_to_zero(void) | 141 | @@ -689,6 +689,7 @@ static void reset_beg_range_to_zero(void) |
@@ -146,7 +146,7 @@ index 6a64836fb..cb625b9fc 100644 | |||
146 | static int spawn_https_helper_openssl(const char *host, unsigned port) | 146 | static int spawn_https_helper_openssl(const char *host, unsigned port) |
147 | { | 147 | { |
148 | char *allocated = NULL; | 148 | char *allocated = NULL; |
149 | @@ -777,6 +778,34 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 149 | @@ -777,6 +778,35 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
150 | # endif | 150 | # endif |
151 | return sp[0]; | 151 | return sp[0]; |
152 | } | 152 | } |
@@ -155,7 +155,6 @@ index 6a64836fb..cb625b9fc 100644 | |||
155 | +static int spawn_https_helper_openssl(const char *host, unsigned port) | 155 | +static int spawn_https_helper_openssl(const char *host, unsigned port) |
156 | +{ | 156 | +{ |
157 | + char* allocated = NULL; | 157 | + char* allocated = NULL; |
158 | + int fd1; | ||
159 | + char *servername, *p, *cmd; | 158 | + char *servername, *p, *cmd; |
160 | + int sp[2]; | 159 | + int sp[2]; |
161 | + if(!strchr(host,":")) | 160 | + if(!strchr(host,":")) |
@@ -165,14 +164,16 @@ index 6a64836fb..cb625b9fc 100644 | |||
165 | + | 164 | + |
166 | + struct tls *ctx = tls_client(); | 165 | + struct tls *ctx = tls_client(); |
167 | + if(ctx == NULL) | 166 | + if(ctx == NULL) |
168 | + bb_error_msg_and_die("Out of memory"); | 167 | + bb_error_msg_and_die("Out of memory 1"); |
169 | + struct tls_config *config = tls_config_new(); | 168 | + struct tls_config *config = tls_config_new(); |
170 | + if(config == NULL) | 169 | + if(config == NULL) |
171 | + bb_error_msg_and_die("Out of memory"); | 170 | + bb_error_msg_and_die(tls_config_error()); |
172 | + if(tls_configure(ctx,config) != 0) | 171 | + if(tls_configure(ctx,config) != 0) |
173 | + bb_error_msg_and_die("Failed to configure client"); | 172 | + bb_error_msg_and_die("Failed to configure client"); |
174 | + tls_connect_fds(ctx,sp[0],sp[1],servername); | 173 | + tls_connect_fds(ctx,sp[0],sp[1],servername); |
175 | + close(sp[1]); | 174 | + close(sp[1]); |
175 | + tls_config_free(config); | ||
176 | + tls_free(ctx) | ||
176 | + free(allocated); | 177 | + free(allocated); |
177 | + free(servername); | 178 | + free(servername); |
178 | + return sp[0]; | 179 | + return sp[0]; |