Browse Source

ENGINE-948: NULL checks

master
Krista Bennett 3 months ago
parent
commit
9b5b9998fd
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/pEpEngine.c

+ 5
- 5
src/pEpEngine.c View File

@ -230,6 +230,8 @@ DYNAMIC_API PEP_STATUS log_event(
const char *comment
)
{
if (!(session && title && entity))
return PEP_ILLEGAL_VALUE;
#if defined(_WIN32) && !defined(NDEBUG)
log_output_debug(title, entity, description, comment);
@ -253,10 +255,7 @@ DYNAMIC_API PEP_STATUS log_event(
session->service_log = true;
int result;
if (!(session && title && entity))
return PEP_ILLEGAL_VALUE;
sqlite3_reset(session->log);
sqlite3_bind_text(session->log, 1, title, -1, SQLITE_STATIC);
sqlite3_bind_text(session->log, 2, entity, -1, SQLITE_STATIC);
@ -1447,7 +1446,8 @@ PEP_STATUS force_set_identity_username(PEP_SESSION session, pEp_identity* ident,
*/
PEP_STATUS update_pEp_user_trust_vals(PEP_SESSION session,
pEp_identity* user) {
if (!user->user_id)
if (!session || !user || EMPTYSTR(user->user_id))
return PEP_ILLEGAL_VALUE;
sqlite3_reset(session->update_trust_to_pEp);


Loading…
Cancel
Save