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
commit8c3815db58dfb852a4351ca67b48690f534cca73 (patch)
tree6d9e34049568a14063de169fd69f927d6f8e17af
parent7c2b5d2cb3eb6df8a8d45c509794ff177f6d4523 (diff)
Fix array subscript overflow
-rw-r--r--odb/mysql/container-statements.txx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/mysql/container-statements.txx b/odb/mysql/container-statements.txx
index 4960d96..d4e8da6 100644
--- a/odb/mysql/container-statements.txx
+++ b/odb/mysql/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].error =
select_image_truncated_array_ + i;