From: John Kessenich Date: Wed, 18 Sep 2019 06:03:18 +0000 (-0600) Subject: HLSL: Fix #1903 Catch 0-argument case to constructors. X-Git-Tag: upstream/11.4.0~399 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54c72c6d2495bed0ddd489954a95143bfddea0d0;p=platform%2Fupstream%2Fglslang.git HLSL: Fix #1903 Catch 0-argument case to constructors. --- diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp index 45cf5d5..8ab1a90 100755 --- a/hlsl/hlslGrammar.cpp +++ b/hlsl/hlslGrammar.cpp @@ -3221,6 +3221,11 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node) return false; } + if (arguments == nullptr) { + expected("one or more arguments"); + return false; + } + // hook it up node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments);