|
1 |
| -// Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. |
| 1 | +// Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. |
2 | 2 |
|
3 | 3 | //-----------------------------------------------------------------------------
|
4 | 4 | //
|
@@ -1032,7 +1032,9 @@ static bool njsVariable_setFromString(njsVariable *var, uint32_t pos,
|
1032 | 1032 | &bufferLength))
|
1033 | 1033 |
|
1034 | 1034 | // check size, if applicable
|
1035 |
| - if (checkSize && bufferLength > var->maxSize) |
| 1035 | + if (checkSize && var->varTypeNum != DPI_ORACLE_TYPE_CLOB && |
| 1036 | + var->varTypeNum != DPI_ORACLE_TYPE_NCLOB && |
| 1037 | + bufferLength > var->maxSize) |
1036 | 1038 | return njsBaton_setError(baton, errMaxSizeTooSmall, var->maxSize,
|
1037 | 1039 | bufferLength, pos);
|
1038 | 1040 |
|
@@ -1193,7 +1195,8 @@ bool njsVariable_setScalarValue(njsVariable *var, uint32_t pos, napi_env env,
|
1193 | 1195 | return njsVariable_setInvalidBind(var, pos, baton);
|
1194 | 1196 | NJS_CHECK_NAPI(env, napi_get_buffer_info(env, value, &buffer,
|
1195 | 1197 | &bufferLength))
|
1196 |
| - if (checkSize && bufferLength > var->maxSize) |
| 1198 | + if (checkSize && var->varTypeNum == DPI_ORACLE_TYPE_RAW && |
| 1199 | + bufferLength > var->maxSize) |
1197 | 1200 | return njsBaton_setError(baton, errMaxSizeTooSmall,
|
1198 | 1201 | var->maxSize, bufferLength, pos);
|
1199 | 1202 | if (dpiVar_setFromBytes(var->dpiVarHandle, pos, buffer,
|
|
0 commit comments