mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 20:01:22 -05:00
gccrs: Fix nullptr dereference
When we check if this is concrete the guard checks to ensure the argument is non null but the check here is wrongly returning early when the check is non null meaning when it is null and therefore not concrete it will end up doing a null dereference. Signed-off-by: Philip Herron <herron.philip@googlemail.com> gcc/rust/ChangeLog: * typecheck/rust-tyty-subst.cc (SubstitutionArg::is_conrete): fix check
This commit is contained in:
committed by
Arthur Cohen
parent
68d671ac72
commit
2a2e6712ba
@@ -213,8 +213,8 @@ SubstitutionArg::is_error () const
|
||||
bool
|
||||
SubstitutionArg::is_conrete () const
|
||||
{
|
||||
if (argument != nullptr)
|
||||
return true;
|
||||
if (argument == nullptr)
|
||||
return false;
|
||||
|
||||
if (argument->get_kind () == TyTy::TypeKind::PARAM)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user