1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix an NULL deref in the randomblob() function following a malloc failure. (CVS 3940)

FossilOrigin-Name: 011e7db253f9a60c19977215eab1687930f15637
This commit is contained in:
drh
2007-05-07 19:31:15 +00:00
parent 7de68a097e
commit 02d858364b
4 changed files with 19 additions and 14 deletions

View File

@ -11,7 +11,7 @@
# This file contains additional out-of-memory checks (see malloc.tcl)
# added to expose a bug in out-of-memory handling for sqlite3_value_text()
#
# $Id: malloc8.test,v 1.2 2007/04/30 21:39:16 drh Exp $
# $Id: malloc8.test,v 1.3 2007/05/07 19:31:17 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -147,6 +147,9 @@ do_malloc_test 4 -sqlbody {
do_malloc_test 5 -sqlbody {
SELECT 1 FROM t1 WHERE a LIKE 'hello' ESCAPE NULL;
}
do_malloc_test 6 -sqlbody {
SELECT hex(randomblob(100));
}
# Ensure that no file descriptors were leaked.
do_test malloc-99.X {