浏览代码

HPCC-13514 Java plugin should detect insufficient arguments

Passing too few arguments to a Java function may segfault at
present.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 年之前
父节点
当前提交
e740f4b730
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      plugins/javaembed/javaembed.cpp

+ 2 - 0
plugins/javaembed/javaembed.cpp

@@ -2222,6 +2222,8 @@ public:
     }
     virtual void callFunction()
     {
+        if (*argsig != ')')
+            throw MakeStringException(0, "javaembed: Too few ECL parameters passed for Java signature %s", sharedCtx->querySignature());
         sharedCtx->callFunction(result, args);
     }