diff --git a/osquery/sql/virtual_sqlite_table.cpp b/osquery/sql/virtual_sqlite_table.cpp index cc094d049e8..f1c1fdac361 100644 --- a/osquery/sql/virtual_sqlite_table.cpp +++ b/osquery/sql/virtual_sqlite_table.cpp @@ -42,6 +42,7 @@ Status genSqliteTableRow(sqlite3_stmt* stmt, auto column_name = std::string(sqlite3_column_name(stmt, i)); auto column_type = sqlite3_column_type(stmt, i); switch (column_type) { + case SQLITE_BLOB: case SQLITE_TEXT: { auto text_value = sqlite3_column_text(stmt, i); if (text_value != nullptr) { @@ -55,7 +56,7 @@ Status genSqliteTableRow(sqlite3_stmt* stmt, break; } case SQLITE_INTEGER: { - auto int_value = sqlite3_column_int(stmt, i); + auto int_value = sqlite3_column_int64(stmt, i); r[column_name] = INTEGER(int_value); break; } diff --git a/osquery/tables/system/darwin/quicklook_cache.cpp b/osquery/tables/system/darwin/quicklook_cache.cpp index 436fb683853..d9ada447627 100644 --- a/osquery/tables/system/darwin/quicklook_cache.cpp +++ b/osquery/tables/system/darwin/quicklook_cache.cpp @@ -44,7 +44,7 @@ void genQuicklookRow(sqlite3_stmt* stmt, Row& r) { } } else if (column_type == SQLITE_INTEGER) { // Handle INTEGER columns explicitly to handle the date-value offset. - auto value = sqlite3_column_int(stmt, i); + auto value = sqlite3_column_int64(stmt, i); if (column_name == "last_hit_date") { value += kReferenceDateOffset; } diff --git a/osquery/tables/system/freebsd/pkg_packages.cpp b/osquery/tables/system/freebsd/pkg_packages.cpp index 4c096e6601b..6093717f766 100644 --- a/osquery/tables/system/freebsd/pkg_packages.cpp +++ b/osquery/tables/system/freebsd/pkg_packages.cpp @@ -33,7 +33,7 @@ void genPkgRow(sqlite3_stmt* stmt, Row& r) { r[column_name] = std::string((const char*)value); } } else if (column_type == SQLITE_INTEGER) { - auto value = sqlite3_column_int(stmt, i); + auto value = sqlite3_column_int64(stmt, i); r[column_name] = INTEGER(value); } }