Merge pull request #278 from uweber/SQLGetTypeInfo_segv

Fix segfault when attempting to access empty table (e.g. from ODBC)
This commit is contained in:
Evan Miller 2021-03-24 09:27:27 -04:00 committed by GitHub
commit 8ddf8e6411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,6 +464,8 @@ mdb_fetch_row(MdbTableDef *table)
do {
if (table->is_temp_table) {
GPtrArray *pages = table->temp_table_pages;
if (pages->len == 0)
return 0;
rows = mdb_get_int16(
g_ptr_array_index(pages, table->cur_pg_num-1),
fmt->row_count_offset);