In SQLite through 3.22.0, databases whose schema is corrupted using a CREATE TABLE AS statement could cause a NULL pointer dereference, related to build.c and prepare.c.
https://www.sqlite.org/cgi/src/vdiff?from=1774f1c3baf0bc3d&to=d75e67654aa9620b
https://www.sqlite.org/cgi/src/timeline?r=corrupt-schema
https://usn.ubuntu.com/4394-1/
https://usn.ubuntu.com/4205-1/
https://lists.debian.org/debian-lts-announce/2023/05/msg00022.html
https://lists.debian.org/debian-lts-announce/2020/08/msg00037.html
https://lists.debian.org/debian-lts-announce/2019/01/msg00009.html
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1756349
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6964
http://www.securityfocus.com/bid/103466
http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00050.html