aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2023-12-29 07:23:17 -0800
committerRobert Sesek <rsesek@chromium.org>2024-01-02 13:32:05 +0000
commited1d564c9edf88c2967474859d0c2b1f0400bf53 (patch)
treebbb767bcb8a98c4ecf88f5004d1ffbd951a60590
parent11ec9c32888c06665b8838f709bd66c0be9789a6 (diff)
downloadgoogle-breakpad-ed1d564c9edf88c2967474859d0c2b1f0400bf53.tar.gz
Fixed high AddressType variable used without being assigned
In RangeMap::StoreRangeInternal, when size <= 0 and !high_ok then the high variable is passed to HexString uninitialized. Change-Id: I7e597cadaf248b607c646534a5d800c17ccdeda9 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5155712 Reviewed-by: Robert Sesek <rsesek@chromium.org>
-rw-r--r--src/processor/range_map-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/processor/range_map-inl.h b/src/processor/range_map-inl.h
index 860314f5..d1a194f3 100644
--- a/src/processor/range_map-inl.h
+++ b/src/processor/range_map-inl.h
@@ -57,7 +57,7 @@ template<typename AddressType, typename EntryType>
bool RangeMap<AddressType, EntryType>::StoreRangeInternal(
const AddressType& base, const AddressType& delta,
const AddressType& size, const EntryType& entry) {
- AddressType high;
+ AddressType high = AddressType();
bool high_ok = false;
if (size > 0) {
std::pair<AddressType, bool> result = AddWithOverflowCheck(base, size - 1);