Skip to content

Commit

Permalink
plugins: initialize destination_reachable
Browse files Browse the repository at this point in the history
Otherwise we later copy the uninitialized memory to descendants,
triggering undefined behavior:

plugins/libplugin-pay.c:2882:34: runtime error: load of value 190, which is not a valid value for type 'bool'
  • Loading branch information
morehouse authored and cdecker committed Jun 5, 2023
1 parent 45cb2b1 commit 3edb092
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -2928,6 +2928,7 @@ static struct routehints_data *routehint_data_init(struct payment *p)
d->routehints = NULL;
d->base = 0;
d->offset = 0;
d->destination_reachable = false;
return d;
}
return d;
Expand Down

0 comments on commit 3edb092

Please sign in to comment.