#84 + tests updated
authoradam <adamansky@gmail.com>
Sat, 20 Jul 2013 10:50:49 +0000 (17:50 +0700)
committeradam <adamansky@gmail.com>
Sat, 20 Jul 2013 10:50:49 +0000 (17:50 +0700)
package.json
tcejdb/configure
tcejdb/configure.ac
tcejdb/debian/changelog
tcejdb/ejdb.c
tcejdb/tcutil.h
tcejdb/testejdb/t4.c

index f977639..bc623c4 100644 (file)
@@ -1,9 +1,9 @@
 {
     "name" : "ejdb",
-    "version" : "1.1.14-4",
+    "version" : "1.1.15-1",
     "config" : {
-        "windownloadurl_ia32" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.14-mingw32-i686.zip",
-        "windownloadurl_x64" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.14-mingw32-x86_64.zip"
+        "windownloadurl_ia32" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.15-mingw32-i686.zip",
+        "windownloadurl_x64" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.15-mingw32-x86_64.zip"
     },
     "main" : "node/ejdb.js",
     "homepage" : "http://ejdb.org",
index 8778233..746134d 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcejdb 1.1.14.
+# Generated by GNU Autoconf 2.69 for tcejdb 1.1.15.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcejdb'
 PACKAGE_TARNAME='tcejdb'
-PACKAGE_VERSION='1.1.14'
-PACKAGE_STRING='tcejdb 1.1.14'
+PACKAGE_VERSION='1.1.15'
+PACKAGE_STRING='tcejdb 1.1.15'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1268,7 +1268,7 @@ if test "$ac_init_help" = "long"; then
   # 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.1.14 to adapt to many kinds of systems.
+\`configure' configures tcejdb 1.1.15 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1333,7 +1333,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcejdb 1.1.14:";;
+     short | recursive ) echo "Configuration of tcejdb 1.1.15:";;
    esac
   cat <<\_ACEOF
 
@@ -1439,7 +1439,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcejdb configure 1.1.14
+tcejdb configure 1.1.15
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1737,7 +1737,7 @@ cat >config.log <<_ACEOF
 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.1.14, which was
+It was created by tcejdb $as_me 1.1.15, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5273,7 +5273,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # 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.1.14, which was
+This file was extended by tcejdb $as_me 1.1.15, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5326,7 +5326,7 @@ _ACEOF
 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.1.14
+tcejdb config.status 1.1.15
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 91b53f1..5d1215c 100644 (file)
@@ -10,7 +10,7 @@ test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS $MYCPPFLAGS"
 test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
 
 # Package name
-AC_INIT(tcejdb, 1.1.14)
+AC_INIT(tcejdb, 1.1.15)
 AC_CANONICAL_HOST
 
 # Package information
index 64e7ca3..eecf4fd 100644 (file)
@@ -1,3 +1,9 @@
+libtcejdb (1.1.15) testing; urgency=low
+
+  * Fixed segfault when passing NULL for cnames #84
+
+ -- Anton Adamansky <adamansky@gmail.com>  Sat, 20 Jul 2013 17:26:41 +0700
+
 libtcejdb (1.1.14-2) testing; urgency=low
 
   * Fix of arrays exporting in json export mode
index adafc36..a295270 100644 (file)
@@ -781,15 +781,21 @@ bool ejdbexport(EJDB *jb, const char *path, TCLIST *cnames, int flags, TCXSTR *l
     }
     TCLIST *_cnames = cnames;
     if (_cnames == NULL) {
-        _cnames = ejdbgetcolls(jb);
-        if (_cnames == NULL) {
+        TCLIST *colls = ejdbgetcolls(jb);
+        if (colls == NULL) {
             _ejdbsetecode2(jb, TCEINVALID, __FILE__, __LINE__, __func__, true);
             return false;
         }
+        _cnames = tclistnew2(TCLISTNUM(colls));
+        for (int i = 0; i < TCLISTNUM(colls); ++i) {
+            EJCOLL *c = TCLISTVALPTR(colls, i);
+            TCLISTPUSH(_cnames, c->cname, c->cnamesz);
+        }
+        tclistdel(colls);
     }
     JBENSUREOPENLOCK(jb, false, false);
-    for (int i = 0; i < TCLISTNUM(cnames); ++i) {
-        const char *cn = TCLISTVALPTR(cnames, i);
+    for (int i = 0; i < TCLISTNUM(_cnames); ++i) {
+        const char *cn = TCLISTVALPTR(_cnames, i);
         assert(cn);
         EJCOLL *coll = _getcoll(jb, cn);
         if (!coll) continue;
index ec9acd6..2f6f366 100644 (file)
@@ -3733,7 +3733,7 @@ typedef unsigned char TCBITMAP; /* type of a bit map object */
 
 #include <stdio.h>
 
-#define _TC_VERSION    "1.1.14"
+#define _TC_VERSION    "1.1.15"
 #define _TC_LIBVER     911
 #define _TC_FORMATVER  "1.0"
 
index 949d97d..a71a669 100644 (file)
@@ -78,7 +78,7 @@ void testBSONExportImport() {
     tclistpush2(cnames, "col2");
 
 
-    bool rv = ejdbexport(jb, "testBSONExportImport", cnames, 0, log);
+    bool rv = ejdbexport(jb, "testBSONExportImport", NULL, 0, log);
     if (!rv) {
         eprint(jb, __LINE__, "testBSONExportImport");
     }