@@ -719,6 +719,13 @@ void Connection::GetBindUnit (Local<Value> val, Bind* bind,
719
719
{
720
720
Local<Array>arr = Local<Array>::Cast (element);
721
721
722
+ // For INOUT bind, maxArraySize is required
723
+ if ( dir == BIND_INOUT && ( arr->Length () > 0 && !bind->maxArraySize ) )
724
+ {
725
+ executeBaton->error = NJSMessages::getErrorMsg ( errReqdMaxArraySize );
726
+ goto exitGetBindUnit;
727
+ }
728
+
722
729
if ( dir == BIND_INOUT && ( arr->Length () > bind->maxArraySize ) )
723
730
{
724
731
executeBaton->error = NJSMessages::getErrorMsg ( errInvalidArraySize );
@@ -1168,7 +1175,8 @@ void Connection::GetInBindParamsArray(Local<Array> va8vals, Bind *bind,
1168
1175
// am actual element largen than the maxSize argument
1169
1176
if (arrayElementSize > static_cast <size_t >(bind->maxSize ))
1170
1177
{
1171
- executeBaton->error = NJSMessages::getErrorMsg (errInvalidArraySize);
1178
+ executeBaton->error = NJSMessages::getErrorMsg (
1179
+ errInsufficientBufferForBinds);
1172
1180
goto exitGetInBindParamsArray;
1173
1181
}
1174
1182
else
@@ -1331,7 +1339,8 @@ bool Connection::AllocateBindArray(unsigned short dataType, Bind* bind,
1331
1339
// an actual element largen than the maxSize argument
1332
1340
if (*arrayElementSize > static_cast <size_t >(bind->maxSize ))
1333
1341
{
1334
- executeBaton->error = NJSMessages::getErrorMsg (errInvalidArraySize);
1342
+ executeBaton->error = NJSMessages::getErrorMsg (
1343
+ errInsufficientBufferForBinds);
1335
1344
goto exitAllocateBindArray;
1336
1345
}
1337
1346
else
0 commit comments