Skip to content

Commit

Permalink
Fix for segault in check_argument_conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Sep 26, 2024
1 parent f5989ba commit c5e524c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

2024-09-26 Fabrice Le Fessant <[email protected]>

* typeck.c (check_argument_conformance): check that param is well defined
to prevent a segfault

2024-09-25 Nicolas Berthier <[email protected]>

* typeck.c (cb_tree_is_numeric_ref_or_field)
Expand Down
3 changes: 3 additions & 0 deletions cobc/typeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -3603,6 +3603,9 @@ check_argument_conformance (struct cb_program *program, cb_tree argument_tripple
} else {
arg_field = NULL;
}
if (!CB_FIELD_P(param)) {
return;
}
param_field = CB_FIELD_PTR(CB_VALUE(param));

/*
Expand Down

0 comments on commit c5e524c

Please sign in to comment.