Skip to content

Commit 700f474

Browse files
committed
Fixed crash after calling incorrectly parametrized request
1 parent e451f30 commit 700f474

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/jrd/extds/ExtDS.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,13 +2273,16 @@ void Statement::setInParams(thread_db* tdbb, const MetaName* const* names,
22732273
const MetaString* sqlName = m_sqlParamsMap[sqlNum];
22742274

22752275
unsigned int num = 0;
2276-
for (; num < count; num++)
2276+
if (names)
22772277
{
2278-
if (*names[num] == *sqlName)
2279-
break;
2278+
for (; num < count; num++)
2279+
{
2280+
if (*names[num] == *sqlName)
2281+
break;
2282+
}
22802283
}
22812284

2282-
if (num == count)
2285+
if (!names || (num == count))
22832286
{
22842287
m_error = true;
22852288
// Input parameter ''@1'' have no value set

0 commit comments

Comments
 (0)