/tcejdb/testejdb/t1
/tcejdb/testejdb/t2
/tcejdb/testejdb/t3
+/tcejdb/testejdb/t4
*/nbproject/private/*
+2013-03-22 Anton Adamansky. <adamansky@gmail.com>
+ * Fixed number index crash #54
+ - Release 1.0.67
+
2013-03-20 Anton Adamansky. <adamansky@gmail.com>
* Python3 binding
* Lua binding
<module type="LUA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
- <content url="file://$USER_HOME$/Downloads/tokyocabinet-lua-1.10" />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Kahlua" jdkType="Lua SDK" />
<orderEntry type="sourceFolder" forTests="false" />
{
"name" : "ejdb",
- "version" : "1.0.64",
+ "version" : "1.0.67",
"main" : "node/ejdb.js",
"homepage" : "http://ejdb.org",
"description" : "EJDB - Embedded JSON Database engine",
}
EJDB_EXPORT int bson_numstrn(char *str, int maxbuf, int64_t i) {
- if (i < 1000 && maxbuf > 4) {
+ if (i >= 0 && i < 1000 && maxbuf > 4) {
memcpy(str, bson_numstrs[i], 4);
return strlen(bson_numstrs[i]);
} else {
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcejdb 1.0.66.
+# Generated by GNU Autoconf 2.69 for tcejdb 1.0.67.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='tcejdb'
PACKAGE_TARNAME='tcejdb'
-PACKAGE_VERSION='1.0.66'
-PACKAGE_STRING='tcejdb 1.0.66'
+PACKAGE_VERSION='1.0.67'
+PACKAGE_STRING='tcejdb 1.0.67'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tcejdb 1.0.66 to adapt to many kinds of systems.
+\`configure' configures tcejdb 1.0.67 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tcejdb 1.0.66:";;
+ short | recursive ) echo "Configuration of tcejdb 1.0.67:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tcejdb configure 1.0.66
+tcejdb configure 1.0.67
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tcejdb $as_me 1.0.66, which was
+It was created by tcejdb $as_me 1.0.67, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tcejdb $as_me 1.0.66, which was
+This file was extended by tcejdb $as_me 1.0.67, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-tcejdb config.status 1.0.66
+tcejdb config.status 1.0.67
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
# Package name
-AC_INIT(tcejdb, 1.0.66)
+AC_INIT(tcejdb, 1.0.67)
# Package information
MYLIBVER=9
+libtcejdb (1.0.67) unstable; urgency=low
+
+ * Fixed number index crash #54
+
+ -- Anton Adamansky <adamansky@gmail.com> Fri, 22 Mar 2013 18:01:39 +0700
+
libtcejdb (1.0.66) stable; urgency=low
* Better BSON error reporting
#include "CUnit/Basic.h"
#include <assert.h>
#include "ejdb_private.h"
+#include "debian/libtcejdb9-dev/usr/include/tcejdb/bson.h"
#include <locale.h>
/*
tcxstrdel(log);
}
+void testTicket54() {
+ EJCOLL *coll = ejdbcreatecoll(jb, "ticket54", NULL);
+ CU_ASSERT_PTR_NOT_NULL_FATAL(coll);
+ bson b;
+ bson_oid_t oid;
+ bson_init(&b);
+ bson_append_long(&b, "value", -10000000L);
+ bson_finish(&b);
+ CU_ASSERT_TRUE(ejdbsavebson(coll, &b, &oid));
+ bson_destroy(&b);
+ CU_ASSERT_TRUE(ejdbsetindex(coll, "value", JBIDXNUM));
+}
+
int main() {
setlocale(LC_ALL, "en_US.UTF-8");
(NULL == CU_add_test(pSuite, "testTicket29", testTicket29)) ||
(NULL == CU_add_test(pSuite, "testTicket28", testTicket28)) ||
(NULL == CU_add_test(pSuite, "testTicket38", testTicket38)) ||
- (NULL == CU_add_test(pSuite, "testTicket43", testTicket43))
+ (NULL == CU_add_test(pSuite, "testTicket43", testTicket43)) ||
+ (NULL == CU_add_test(pSuite, "testTicket54", testTicket54))
) {
CU_cleanup_registry();
return CU_get_error();