From 826fb379f6a0a7d12e4c8ac3d0988ebfd7d2a29c Mon Sep 17 00:00:00 2001 From: Ev3nt Date: Thu, 24 Jul 2025 12:49:41 +0300 Subject: [PATCH] Fixed crash after calling incorrectly parametrized request --- src/jrd/extds/ExtDS.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jrd/extds/ExtDS.cpp b/src/jrd/extds/ExtDS.cpp index 736260ea222..f6e11c58e1b 100644 --- a/src/jrd/extds/ExtDS.cpp +++ b/src/jrd/extds/ExtDS.cpp @@ -2235,6 +2235,12 @@ void Statement::setInParams(thread_db* tdbb, const MetaName* const* names, const FB_SIZE_T excCount = in_excess ? in_excess->getCount() : 0; const FB_SIZE_T sqlCount = m_sqlParamNames.getCount(); + if (m_error = (!names && sqlCount)) + { + // Parameter name expected + ERR_post(Arg::Gds(isc_eds_prm_name_expected)); + } + // OK : count - excCount <= sqlCount <= count // Check if all passed named parameters, not marked as excess, are present in query text