mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-21 03:57:55 +08:00
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:
@@ -464,6 +464,8 @@ mdb_fetch_row(MdbTableDef *table)
|
|||||||
do {
|
do {
|
||||||
if (table->is_temp_table) {
|
if (table->is_temp_table) {
|
||||||
GPtrArray *pages = table->temp_table_pages;
|
GPtrArray *pages = table->temp_table_pages;
|
||||||
|
if (pages->len == 0)
|
||||||
|
return 0;
|
||||||
rows = mdb_get_int16(
|
rows = mdb_get_int16(
|
||||||
g_ptr_array_index(pages, table->cur_pg_num-1),
|
g_ptr_array_index(pages, table->cur_pg_num-1),
|
||||||
fmt->row_count_offset);
|
fmt->row_count_offset);
|
||||||
|
Reference in New Issue
Block a user