BerkeleyDB

Check-in [8d6de2275f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected invalid memory access in secondary key callback
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | v2.2.1
Files: files | file ages | folders
SHA1:8d6de2275fcb2f2e5e3f459e406bbf7c4cd2bd2e
User & Date: murphy 2013-06-07 01:38:57
Context
2013-06-07
01:39
Updated release information check-in: 3043953abd user: murphy tags: trunk
01:38
Corrected invalid memory access in secondary key callback check-in: 8d6de2275f user: murphy tags: trunk, v2.2.1
2013-06-06
23:50
Updated release information check-in: 973bf6b65d user: murphy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to berkeley-db.scm.

746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
	 (let ((result-data (vector-ref result-data i)))
	   ((foreign-lambda*
	     void (((nonnull-c-pointer "DBT") results)
		   (unsigned-long i)
		   (nonnull-scheme-pointer result_data)
		   (unsigned-long result_size))
	     "if (results->data) {"
	     "  DBT *result = &((DBT *)results)[i];"
	     "  if ((result->data = malloc(result_size))) {"
	     "    memcpy(result->data, result_data, result_size);"
	     "    result->size = result_size;"
	     "    result->flags = DB_DBT_APPMALLOC;"
	     "  }"
	     "}")
	    results i result-data (blob/string-size result-data))))))







|







746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
	 (let ((result-data (vector-ref result-data i)))
	   ((foreign-lambda*
	     void (((nonnull-c-pointer "DBT") results)
		   (unsigned-long i)
		   (nonnull-scheme-pointer result_data)
		   (unsigned-long result_size))
	     "if (results->data) {"
	     "  DBT *result = &((DBT *)results->data)[i];"
	     "  if ((result->data = malloc(result_size))) {"
	     "    memcpy(result->data, result_data, result_size);"
	     "    result->size = result_size;"
	     "    result->flags = DB_DBT_APPMALLOC;"
	     "  }"
	     "}")
	    results i result-data (blob/string-size result-data))))))

Changes to berkeley-db.setup.

7
8
9
10
11
12
13
14
(compile -s -O2 ,d* "berkeley-db.scm" -ldb -J)
(compile -s -O2 -d0 "berkeley-db.import.scm")

(install-extension
 'berkeley-db
 '("berkeley-db.so"
   "berkeley-db.import.so")
 '((version "2.2.0")))







|
7
8
9
10
11
12
13
14
(compile -s -O2 ,d* "berkeley-db.scm" -ldb -J)
(compile -s -O2 -d0 "berkeley-db.import.scm")

(install-extension
 'berkeley-db
 '("berkeley-db.so"
   "berkeley-db.import.so")
 '((version "2.2.1")))