[evolution-data-server] addressbook: Strengthen an assertion to avoid negative bit shifts
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] addressbook: Strengthen an assertion to avoid negative bit shifts
- Date: Mon, 3 Nov 2014 22:19:04 +0000 (UTC)
commit 51e9e697fa0cda4291735c2f548dedab14b2dd01
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Nov 1 14:10:08 2014 +0000
addressbook: Strengthen an assertion to avoid negative bit shifts
This should never happen in practice, but it is good to be completely
explicit in the assertion.
Follow up to commit 10d55d18.
Coverity issue: #1250458
https://bugzilla.gnome.org/show_bug.cgi?id=730378
addressbook/libedata-book/e-book-sqlite.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-sqlite.c b/addressbook/libedata-book/e-book-sqlite.c
index 905dec7..49df7ee 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -5576,6 +5576,7 @@ ebsql_generate_autocomplete_query (EBookSqlite *ebsql,
continue;
aux_index = summary_field_get_index (ebsql, test->field_id);
+ g_warn_if_fail (aux_index >= 0 && aux_index < EBSQL_MAX_SUMMARY_FIELDS);
context->aux_mask = (1 << aux_index);
context->left_join_mask = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]