Skip to content

Commit cb61311

Browse files
Ev3nthvlad
authored andcommitted
Fixed crash after calling incorrectly parametrized request (#8666)
* Fixed crash after calling incorrectly parametrized request * Patch: Fixed crash after calling incorrectly parametrized request
1 parent 825bdc2 commit cb61311

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/jrd/extds/ExtDS.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,6 +2235,12 @@ void Statement::setInParams(thread_db* tdbb, const MetaName* const* names,
22352235
const FB_SIZE_T excCount = in_excess ? in_excess->getCount() : 0;
22362236
const FB_SIZE_T sqlCount = m_sqlParamNames.getCount();
22372237

2238+
if (m_error = (!names && sqlCount))
2239+
{
2240+
// Parameter name expected
2241+
ERR_post(Arg::Gds(isc_eds_prm_name_expected));
2242+
}
2243+
22382244
// OK : count - excCount <= sqlCount <= count
22392245

22402246
// Check if all passed named parameters, not marked as excess, are present in query text

0 commit comments

Comments
 (0)