i_assert(*name != '\0');
i_assert(value != NULL);
+ i_assert(request->passdb != NULL);
+
if (strcmp(name, "password") == 0) {
auth_request_set_password(request, value,
default_scheme, FALSE);
ret = ldap_start_tls_s(conn->ld, NULL, NULL);
if (ret != LDAP_SUCCESS) {
if (ret == LDAP_OPERATIONS_ERROR &&
+ conn->set.uris != NULL &&
strncmp(conn->set.uris, "ldaps:", 6) == 0) {
i_fatal("LDAP: Don't use both tls=yes "
"and ldaps URI");
str = password_generate_md5_crypt(plaintext, password);
return strcmp(str, password) == 0 ? 1 : 0;
} else if (password_decode(password, "PLAIN-MD5",
- &md5_password, &md5_size, &error) < 0) {
+ &md5_password, &md5_size, &error) <= 0) {
*error_r = "Not a valid MD5-CRYPT or PLAIN-MD5 password";
return -1;
} else {
file->filepath);
return 0;
}
+ i_assert(file->buffer != NULL);
return log_file_map_check_offsets(file, start_offset,
end_offset);
}
i_assert(file->buffer == NULL || file->mmap_base != NULL ||
file->sync_offset >= file->buffer_offset + file->buffer->used);
+ if (ret <= 0)
+ return ret;
- return ret <= 0 ? ret :
- log_file_map_check_offsets(file, start_offset, end_offset);
+ i_assert(file->buffer != NULL);
+ return log_file_map_check_offsets(file, start_offset, end_offset);
}
void mail_transaction_log_file_move_to_memory(struct mail_transaction_log_file
/* try again */
}
+ i_assert(ret < 0 || log->head != NULL);
return ret;
}
int trailer_size;
int ret = 1;
+ *next_offset_r = (uoff_t)-1;
+
hdr = mail_index_get_header(mail->mail.mail.transaction->view);
if (mail->mail.mail.seq > hdr->messages_count) {
/* we're appending a new message */
mail->mail.mail.uid);
}
}
- if (ret <= 0)
- next_offset = (uoff_t)-1;
raw_stream = mbox->mbox_stream;
hdr_offset = istream_raw_mbox_get_header_offset(raw_stream);
ctx->finished = TRUE;
if (!ctx->failed) {
+ i_assert(ctx->output != NULL);
T_BEGIN {
if (mbox_write_content_length(ctx) < 0 ||
mbox_append_lf(ctx) < 0)
squat_uidlist_set_corrupted(uidlist, "uidlist not found");
return -1;
}
+ i_assert(uidlist->cur_block_end_indexes != NULL);
if (unlikely(idx > 0 &&
uidlist->cur_block_end_indexes[idx-1] > uid_list_idx)) {
squat_uidlist_set_corrupted(uidlist, "broken block list");
return -1;
/* find the uidlist inside the block */
+ i_assert(uidlist->cur_block_offsets != NULL);
p = CONST_PTR_OFFSET(uidlist->data, uidlist->cur_block_offsets[idx]);
end = CONST_PTR_OFFSET(uidlist->data, uidlist->data_size);