Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion OdbcDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ SQLRETURN OdbcDesc::operator =(OdbcDesc &sour)

for ( int n = 0 ; n <= headCount ; n++ )
{
DescRecord *srcrec = sour.records[n];
// sour.records is NULL for an empty source — guard like the other loops in this file.
DescRecord *srcrec = sour.records ? sour.records[n] : NULL;
DescRecord &rec = *getDescRecord ( n );

if ( srcrec )
Expand Down
3 changes: 0 additions & 3 deletions tests/test_phase7_crusher_fixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
class CopyDescCrashTest : public OdbcConnectedTest {};

TEST_F(CopyDescCrashTest, CopyEmptyARDDoesNotCrash) {
GTEST_SKIP() << "Requires Phase 7: ODBC Crusher-identified bug fixes (not yet merged)";
// Allocate two statements with no bindings (empty ARDs)
SQLHSTMT stmt1 = AllocExtraStmt();
SQLHSTMT stmt2 = AllocExtraStmt();
Expand Down Expand Up @@ -49,7 +48,6 @@ TEST_F(CopyDescCrashTest, CopyEmptyARDDoesNotCrash) {
}

TEST_F(CopyDescCrashTest, CopyEmptyToExplicitDescriptor) {
GTEST_SKIP() << "Requires Phase 7: ODBC Crusher-identified bug fixes (not yet merged)";
// Allocate an explicit descriptor
SQLHDESC hExplicit = SQL_NULL_HDESC;
SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_DESC, hDbc, &hExplicit);
Expand All @@ -70,7 +68,6 @@ TEST_F(CopyDescCrashTest, CopyEmptyToExplicitDescriptor) {
}

TEST_F(CopyDescCrashTest, CopyPopulatedThenEmpty) {
GTEST_SKIP() << "Requires Phase 7: ODBC Crusher-identified bug fixes (not yet merged)";
// First, populate an explicit descriptor by copying a populated ARD
SQLINTEGER val = 0;
SQLLEN ind = 0;
Expand Down