1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 10:39:27 +02:00

update libetpan from 1.8 to 1.8.0-dev-20180528

This commit is contained in:
B. Petersen 2018-05-28 20:28:01 +02:00
parent 94573580e2
commit e07df154d8
7 changed files with 30 additions and 7 deletions

View file

@ -125,7 +125,7 @@
#define LIBETPAN_REENTRANT 1
/* Define this to the version of libEtPan */
#define LIBETPAN_VERSION "1.8.0"
#define LIBETPAN_VERSION "1.8.0-dev-20180528"
/* Define this to the major version of libEtPan */
#define LIBETPAN_VERSION_MAJOR 1

View file

@ -190,7 +190,11 @@ int mail_unix_connect_socket(const char *path)
struct sockaddr_un sa;
int s;
if (!(memcpy(sa.sun_path, path, strlen(path)))) {
if (sizeof(sa.sun_path) <= strlen(path)) {
return -1;
}
if (!(memcpy(sa.sun_path, path, sizeof(sa.sun_path)))) {
return -1;
}
sa.sun_family = AF_UNIX;

View file

@ -408,7 +408,7 @@ static void mailstream_ssl_context_free(struct mailstream_ssl_context * ssl_ctx)
static int mailstream_openssl_client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
{
struct mailstream_ssl_context * ssl_context = (struct mailstream_ssl_context *)SSL_CTX_get_app_data(ssl->ctx);
struct mailstream_ssl_context * ssl_context = (struct mailstream_ssl_context *)SSL_CTX_get_app_data(SSL_get_SSL_CTX(ssl));
if (x509 == NULL || pkey == NULL) {
return 0;

View file

@ -37,6 +37,10 @@
# include <config.h>
#endif
#if __APPLE__
#include <TargetConditionals.h>
#endif
#include "mailprivacy_tools.h"
#include "mailprivacy_tools_private.h"
@ -1323,6 +1327,12 @@ int mailprivacy_spawn_and_wait(char * command, char * passphrase,
char * stdoutfile, char * stderrfile,
int * bad_passphrase)
{
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
//https://github.com/dinhviethoa/libetpan/issues/275
//mailprivacy_spawn_and_wait is not needed on iOS
return MAIL_ERROR_COMMAND;
#endif
#ifdef WIN32
int res;
SECURITY_ATTRIBUTES sec_attr;
@ -1509,8 +1519,12 @@ int mailprivacy_spawn_and_wait(char * command, char * passphrase,
dup2(fd_err, 2);
close(fd_err);
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
//https://github.com/dinhviethoa/libetpan/issues/275
//system() is not supported on iOS 11.
status = system(command);
#endif
exit(WEXITSTATUS(status));
}
break;

View file

@ -345,8 +345,10 @@ int mailimap_acl_myrights(mailimap * session,
ext_data->ext_extension->ext_id == MAILIMAP_EXTENSION_ACL &&
ext_data->ext_type == MAILIMAP_ACL_TYPE_MYRIGHTS_DATA) {
* result = (struct mailimap_acl_myrights_data *)ext_data->ext_data;
ext_data->ext_data = NULL;
/* remove the element from rsp_extension_list */
clist_delete(session->imap_response_info->rsp_extension_list, cur);
mailimap_extension_data_free(ext_data);
break;
}

View file

@ -166,7 +166,8 @@ mailimap_extension_data_free(struct
if (data == NULL)
return;
if (data->ext_extension != NULL)
if (data->ext_extension != NULL && data->ext_data != NULL)
/* ext_free() includes free(data) */
data->ext_extension->ext_free(data);
else
free(data);

View file

@ -1201,8 +1201,10 @@ mailimap_flag_list_new(clist * fl_list)
LIBETPAN_EXPORT
void mailimap_flag_list_free(struct mailimap_flag_list * flag_list)
{
clist_foreach(flag_list->fl_list, (clist_func) mailimap_flag_free, NULL);
clist_free(flag_list->fl_list);
if (flag_list->fl_list) {
clist_foreach(flag_list->fl_list, (clist_func) mailimap_flag_free, NULL);
clist_free(flag_list->fl_list);
}
free(flag_list);
}