Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bolt11: avoid reading uninitialized memory
If both databits and *data_len are 0, pull_uint returns unitialized stack memory in *val. Detected by valgrind and UBSan. valgrind: ==225078== Use of uninitialised value of size 8 ==225078== __sanitizer_cov_trace_cmp8 ==225078== decode_c (bolt11.c:294) ==225078== bolt11_decode_nosig (bolt11.c:881) ==225078== bolt11_decode (bolt11.c:945) UBSan: common/bolt11.c:79:29: runtime error: shift exponent 64 is too large for 64-bit type 'uint64_t'
- Loading branch information