Skip to content

Commit 66fd711

Browse files
authored
Fix build error #2097 (#2098)
1 parent 7f2106e commit 66fd711

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Common++/src/OUILookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace pcpp
9292
}
9393

9494
// Get MAC address
95-
uint8_t buffArray[6];
95+
uint8_t buffArray[6] = { 0 };
9696
addr.copyTo(buffArray);
9797

9898
const uint64_t macAddr = (((uint64_t)((buffArray)[5]) << 0) + ((uint64_t)((buffArray)[4]) << 8) +

Packet++/src/StpLayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace pcpp
2020

2121
uint64_t StpLayer::macAddressToID(const pcpp::MacAddress& addr)
2222
{
23-
uint8_t value[6];
23+
uint8_t value[6] = { 0 };
2424
addr.copyTo(value);
2525
return ((uint64_t(value[0]) << 40) | (uint64_t(value[1]) << 32) | (uint64_t(value[2]) << 24) |
2626
(uint64_t(value[3]) << 16) | (uint64_t(value[4]) << 8) | (uint64_t(value[5])));

0 commit comments

Comments
 (0)