This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Tarantool -- an efficient key/value data store".
The branch master-stable has been updated
via 541519dab2cfc20b2ad8ee0a12ad96d3dc083313 (commit)
from ca2e6cf4455fbb92dc4ca6b52d481005709823a1 (commit)
Summary of changes:
mod/silverbox/box.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
commit 541519dab2cfc20b2ad8ee0a12ad96d3dc083313
Author: Roman Tokarev <[email protected]>
Date: Fri Mar 18 17:18:38 2011 +0300
Don't allow commands with negative namespace number.
Zero index structure before use.
diff --git a/mod/silverbox/box.c b/mod/silverbox/box.c
index 97d21fe..4f8ff6d 100644
--- a/mod/silverbox/box.c
+++ b/mod/silverbox/box.c
@@ -763,7 +763,7 @@ box_dispach(struct box_txn *txn, enum box_mode mode, u16
op, struct tbuf *data)
txn->op = op;
txn->n = read_u32(data);
- if (txn->n > namespace_count - 1)
+ if (txn->n < 0 || txn->n > namespace_count - 1)
box_raise(ERR_CODE_NO_SUCH_NAMESPACE, "bad namespace number");
txn->index = &namespace[txn->n].index[0];
@@ -1095,6 +1095,8 @@ custom_init(void)
struct index *index = &namespace[i].index[j];
u32 max_key_fieldno = 0;
+ memset(index, 0, sizeof(*index));
+
if (cfg.namespace[i]->index[j] == NULL)
break;
--
Tarantool -- an efficient key/value data store
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp