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 has been updated
       via  7a6b21bfaddcde3a8c7ed0b15f1404a2e4acda7a (commit)
       via  541519dab2cfc20b2ad8ee0a12ad96d3dc083313 (commit)
      from  95454134cb20afb4a4477b7a591bf01950f32243 (commit)

Summary of changes:
 mod/box/box.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

commit 7a6b21bfaddcde3a8c7ed0b15f1404a2e4acda7a
Merge: 9545413 541519d
Author: Roman Tokarev <[email protected]>
Date:   Mon Mar 21 14:29:33 2011 +0300

    Merge branch 'master-stable'


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

Reply via email to