Skip to content

Commit 1f2fcff

Browse files
authored
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 45c456b commit 1f2fcff

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
@@ -2237,6 +2237,12 @@ void Statement::setInParams(thread_db* tdbb, const MetaName* const* names,
22372237
const FB_SIZE_T excCount = in_excess ? in_excess->getCount() : 0;
22382238
const FB_SIZE_T sqlCount = m_sqlParamNames.getCount();
22392239

2240+
if (m_error = (!names && sqlCount))
2241+
{
2242+
// Parameter name expected
2243+
ERR_post(Arg::Gds(isc_eds_prm_name_expected));
2244+
}
2245+
22402246
// OK : count - excCount <= sqlCount <= count
22412247

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

0 commit comments

Comments
 (0)