aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-02 12:28:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-02 12:28:33 +0200
commit97866a78e12fd4398ef9cb023feba794dbf7ff32 (patch)
treed88acddb59e9ef2cd2ee3edd3a806d253aabec51
parent89ceaaf470d19d475d665b87a1fbe66009d0912b (diff)
Fix array subscript overflow
-rw-r--r--odb/sqlite/container-statements.txx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/sqlite/container-statements.txx b/odb/sqlite/container-statements.txx
index a4dd6f4..19ecfdc 100644
--- a/odb/sqlite/container-statements.txx
+++ b/odb/sqlite/container-statements.txx
@@ -58,7 +58,9 @@ namespace odb
0,
sizeof (select_image_truncated_array_));
- for (std::size_t i (0); i < traits::data_column_count; ++i)
+ for (std::size_t i (0);
+ i < traits::data_column_count - traits::id_column_count;
+ ++i)
data_image_bind_[i + traits::id_column_count].truncated =
select_image_truncated_array_ + i;