mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 11:19:30 +00:00
Do not crash in lime if either message or content type is NULL
This commit is contained in:
parent
d67eeda873
commit
ab06d51476
1 changed files with 3 additions and 0 deletions
|
|
@ -485,6 +485,9 @@ int lime_createMultipartMessage(void *cachedb, const char *contentType, uint8_t
|
|||
if (bzrtp_getSelfZID(cachedb, selfURI, selfZid, NULL) != 0) {
|
||||
return LIME_UNABLE_TO_ENCRYPT_MESSAGE;
|
||||
}
|
||||
if (message == NULL || contentType == NULL) {
|
||||
return LIME_UNABLE_TO_ENCRYPT_MESSAGE;
|
||||
}
|
||||
|
||||
/* encrypted message length is plaintext + 16 for tag */
|
||||
encryptedMessageLength = (uint32_t)strlen((char *)message) + 16;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue