Преглед изворни кода

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);
     }