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

Fix a NULL pointer dereference after a syntax error that can occur as a

result of check-in [6b2ff26c25bb9da3] yesterday.  This problem was
discovered by the OSSFuzz.

FossilOrigin-Name: d49afb8f9804e96662d1e3cadc4c6643908706d848a53d5ed019919c98f2ccba
This commit is contained in:
drh
2017-12-24 18:56:28 +00:00
parent 88a921ce60
commit 512795dfea
4 changed files with 19 additions and 8 deletions

View File

@ -398,6 +398,16 @@ do_execsql_test colname-9.320 {
SELECT name FROM pragma_table_info('t2');
} {Bbb}
# Issue detected by clusterfuzz on 2017-12-24 (Christmas Eve)
# caused by check-in https://sqlite.org/src/info/6b2ff26c25
#
# Prior to being fixed, the following CREATE TABLE was dereferencing
# a NULL pointer and segfaulting.
#
do_catchsql_test colname-9.400 {
CREATE TABLE t4 AS SELECT #0;
} {1 {near "#0": syntax error}}
# Make sure the quotation marks get removed from the column names
# when constructing a new table from an aggregate SELECT.