[evolution-data-server/evolution-data-server-3-12] 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/evolution-data-server-3-12] addressbook: Strengthen an assertion to avoid negative bit shifts
- Date: Wed, 21 May 2014 12:45:41 +0000 (UTC)
commit 5accb2bc3a35406201da89ddd4666e715a3c034a
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon May 19 14:50:41 2014 +0100
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.
Coverity issue: #1214485
https://bugzilla.gnome.org/show_bug.cgi?id=730378
addressbook/libedata-book/e-book-sqlite.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-sqlite.c b/addressbook/libedata-book/e-book-sqlite.c
index d29e3f3..0ae89cd 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -4617,7 +4617,7 @@ query_preflight_check (PreflightContext *context,
/* It's really improbable that we ever get 64 fields in the summary
* In any case we warn about this in e_book_sqlite_new_full().
*/
- g_warn_if_fail (aux_index < EBSQL_MAX_SUMMARY_FIELDS);
+ g_warn_if_fail (aux_index >= 0 && aux_index < EBSQL_MAX_SUMMARY_FIELDS);
context->aux_mask |= (1 << aux_index);
EBSQL_NOTE (
PREFLIGHT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]