dovecot-2.2: Make Coverity happier.
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 9 17:01:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/49f5131a502e
changeset: 18619:49f5131a502e
user: Timo Sirainen <tss at iki.fi>
date: Sat May 09 19:58:59 2015 +0300
description:
Make Coverity happier.
diffstat:
src/lib-http/http-server-connection.c | 2 ++
src/lib-index/mail-transaction-log-file.c | 1 +
src/lib-mail/ostream-dot.c | 1 +
src/lib-storage/index/index-mail.c | 2 ++
src/lib-storage/index/maildir/maildir-uidlist.c | 1 +
5 files changed, 7 insertions(+), 0 deletions(-)
diffs (62 lines):
diff -r 8b452eb97422 -r 49f5131a502e src/lib-http/http-server-connection.c
--- a/src/lib-http/http-server-connection.c Sat May 09 19:57:28 2015 +0300
+++ b/src/lib-http/http-server-connection.c Sat May 09 19:58:59 2015 +0300
@@ -541,11 +541,13 @@
switch (error_code) {
case HTTP_REQUEST_PARSE_ERROR_BROKEN_REQUEST:
conn->input_broken = TRUE;
+ /* fall through */
case HTTP_REQUEST_PARSE_ERROR_BAD_REQUEST:
http_server_request_fail(req, 400, "Bad Request");
break;
case HTTP_REQUEST_PARSE_ERROR_METHOD_TOO_LONG:
conn->input_broken = TRUE;
+ /* fall through */
case HTTP_REQUEST_PARSE_ERROR_NOT_IMPLEMENTED:
http_server_request_fail(req, 501, "Not Implemented");
break;
diff -r 8b452eb97422 -r 49f5131a502e src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c Sat May 09 19:57:28 2015 +0300
+++ b/src/lib-index/mail-transaction-log-file.c Sat May 09 19:58:59 2015 +0300
@@ -1620,6 +1620,7 @@
if (file->mmap_base == NULL)
return;
+ i_assert(file->buffer != NULL);
if (munmap(file->mmap_base, file->mmap_size) < 0)
log_file_set_syscall_error(file, "munmap()");
file->mmap_base = NULL;
diff -r 8b452eb97422 -r 49f5131a502e src/lib-mail/ostream-dot.c
--- a/src/lib-mail/ostream-dot.c Sat May 09 19:57:28 2015 +0300
+++ b/src/lib-mail/ostream-dot.c Sat May 09 19:58:59 2015 +0300
@@ -139,6 +139,7 @@
case '.':
/* add dot */
add = '.';
+ /* fall through */
default:
dstream->state = STREAM_STATE_NONE;
break;
diff -r 8b452eb97422 -r 49f5131a502e src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c Sat May 09 19:57:28 2015 +0300
+++ b/src/lib-storage/index/index-mail.c Sat May 09 19:58:59 2015 +0300
@@ -920,6 +920,8 @@
old_offset = mail->data.stream == NULL ? 0 : mail->data.stream->v_offset;
if (mail_get_stream(&mail->mail.mail, NULL, NULL, &input) < 0)
return -1;
+ i_assert(mail->data.stream != NULL);
+
i_stream_seek(input, part->physical_pos);
input = i_stream_create_limit(input, part->header_size.physical_size +
part->body_size.physical_size);
diff -r 8b452eb97422 -r 49f5131a502e src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Sat May 09 19:57:28 2015 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c Sat May 09 19:58:59 2015 +0300
@@ -1976,6 +1976,7 @@
array_free(&uidlist->records);
uidlist->records = ctx->records;
ctx->records.arr.buffer = NULL;
+ i_assert(array_is_created(&uidlist->records));
hash_table_destroy(&uidlist->files);
uidlist->files = ctx->files;
More information about the dovecot-cvs
mailing list