Skip to content

Commit 66356f8

Browse files
committed
oxcmail: repair nullptr deref when run under test environment
Tests do not necessarily set all the function pointers to something. Fixes: gromox-2.26-91-gc585401b8
1 parent fd24bb4 commit 66356f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mapi/oxcmail.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ BOOL oxcmail_username_to_entryid(const char *username,
231231
{
232232
std::string essdn;
233233

234-
if (oxcmail_get_user_ids(username, nullptr, nullptr, dtpp) &&
234+
if (oxcmail_get_user_ids != nullptr &&
235+
oxcmail_get_user_ids(username, nullptr, nullptr, dtpp) &&
235236
cvt_username_to_essdn(username, g_oxcmail_org_name,
236237
oxcmail_get_user_ids, oxcmail_get_domain_ids,
237238
essdn) == ecSuccess)

0 commit comments

Comments
 (0)