d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. From-SVN: r270697
This commit is contained in:
parent
81adfd10c9
commit
80b1ab1579
|
@ -1,5 +1,8 @@
|
||||||
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
2019-04-30 Ben L <bobsayshilol@live.co.uk>
|
||||||
|
|
||||||
|
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
|
||||||
|
* testsuite/d-demangle-expected: Add testcase.
|
||||||
|
|
||||||
* d-demangle.c (dlang_parse_integer): Fix stack underflow.
|
* d-demangle.c (dlang_parse_integer): Fix stack underflow.
|
||||||
* testsuite/d-demangle-expected: Add testcase.
|
* testsuite/d-demangle-expected: Add testcase.
|
||||||
|
|
||||||
|
|
|
@ -1191,6 +1191,9 @@ dlang_parse_arrayliteral (string *decl, const char *mangled)
|
||||||
while (elements--)
|
while (elements--)
|
||||||
{
|
{
|
||||||
mangled = dlang_value (decl, mangled, NULL, '\0');
|
mangled = dlang_value (decl, mangled, NULL, '\0');
|
||||||
|
if (mangled == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (elements != 0)
|
if (elements != 0)
|
||||||
string_append (decl, ", ");
|
string_append (decl, ", ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1310,3 +1310,7 @@ core.demangle.mangle!(void*() function).mangle(const(char)[], char[]).DotSplitte
|
||||||
--format=dlang
|
--format=dlang
|
||||||
_D8__T2fnVa8888888888888_
|
_D8__T2fnVa8888888888888_
|
||||||
_D8__T2fnVa8888888888888_
|
_D8__T2fnVa8888888888888_
|
||||||
|
# Could crash
|
||||||
|
--format=dlang
|
||||||
|
_D5__T2fnVmA1A1A911111111D
|
||||||
|
_D5__T2fnVmA1A1A911111111D
|
||||||
|
|
Loading…
Reference in New Issue