Commit 2eeec53
Storm Knight
lightningd/peer_control: initialize error pointer in handle_peer_spoke
The local variable `error` in handle_peer_spoke() is declared as a
pointer type with no initialization. Several error paths jump to the
`send_error` label where `error` is dereferenced (passed to
tal_hex() and towire_connectd_peer_send_msg()). While sockpair()
currently sets the `error` pointer via the output parameter on
failure, the declaration should be initialized to NULL as a defensive
measure and to avoid undefined behavior if code paths change.
Fixes #88491 parent c4c4d81 commit 2eeec53
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1993 | 1993 | | |
1994 | 1994 | | |
1995 | 1995 | | |
1996 | | - | |
| 1996 | + | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
| |||
0 commit comments