[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: Wed, 21 May 2014 12:44:43 +0000 (UTC)
commit 10d55d188c33ef29cfb32323e0b555a2b0539b4a
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 5d8dc0c..c28497a 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -4632,7 +4632,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]