|
@@ -2259,6 +2259,9 @@ searchObjectForKeyRec(const char *searchKey, CtxJson *ctx,
|
|
|
if(jsoneq((char*)ctx->pos, &parseCtx->tokenArray[parseCtx->index], searchKey) == 0) {
|
|
|
|
|
|
parseCtx->index++;
|
|
|
+ if (parseCtx->index >= parseCtx->tokenCount)
|
|
|
+
|
|
|
+ return UA_STATUSCODE_BADOUTOFRANGE;
|
|
|
*resultIndex = parseCtx->index;
|
|
|
return UA_STATUSCODE_GOOD;
|
|
|
}
|