Browse Source

Fixed double free and unprotected NULL dereferencing.

doc_update_sequoia
Edouard Tisserant 7 years ago
parent
commit
040a982082
3 changed files with 9 additions and 3 deletions
  1. +2
    -1
      build-android/build.sh
  2. +4
    -1
      src/keymanagement.c
  3. +3
    -1
      src/message_api.c

+ 2
- 1
build-android/build.sh View File

@ -7,7 +7,8 @@ ANDROID_PLATFORM=android-21
openssl_build_version=1
cyrus_sasl_build_version=1
libetpan_build_version=1
archs="armeabi armeabi-v7a x86 x86_64"
# archs="armeabi armeabi-v7a x86 x86_64"
archs="armeabi"
package_name=pEpEngine-android
current_dir="`pwd`"


+ 4
- 1
src/keymanagement.c View File

@ -235,7 +235,10 @@ DYNAMIC_API PEP_STATUS myself(PEP_SESSION session, pEp_identity * identity)
if (status == PEP_OUT_OF_MEMORY)
return PEP_OUT_OF_MEMORY;
assert(keylist);
assert(keylist || keylist->value);
if (keylist == NULL || keylist->value == NULL) {
return PEP_UNKNOWN_ERROR;
}
}
else {
bool expired;


+ 3
- 1
src/message_api.c View File

@ -327,8 +327,10 @@ static PEP_STATUS encrypt_PGP_MIME(
_src->enc_format = PEP_enc_none;
status = mime_encode_message(_src, true, &mimetext);
assert(status == PEP_STATUS_OK);
if (free_ptext)
if (free_ptext){
free(ptext);
free_ptext=0;
}
free(_src);
assert(mimetext);
if (mimetext == NULL)


Loading…
Cancel
Save