mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
fix(Foundation): Poco::Placeholder initialization uses wrong size (#4711)
This commit is contained in:
parent
072e980e1d
commit
962dd24e6b
@ -80,7 +80,7 @@ public:
|
|||||||
|
|
||||||
Placeholder(): pHolder(0)
|
Placeholder(): pHolder(0)
|
||||||
{
|
{
|
||||||
std::memset(holder, 0, sizeof(Placeholder));
|
std::memset(holder, 0, sizeof(holder));
|
||||||
}
|
}
|
||||||
|
|
||||||
~Placeholder()
|
~Placeholder()
|
||||||
@ -101,8 +101,8 @@ public:
|
|||||||
|
|
||||||
bool isEmpty() const
|
bool isEmpty() const
|
||||||
{
|
{
|
||||||
static char buf[SizeV+1] = {};
|
static char buf[sizeof(holder)] = {};
|
||||||
return 0 == std::memcmp(holder, buf, SizeV+1);
|
return 0 == std::memcmp(holder, buf, sizeof(holder));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isLocal() const
|
bool isLocal() const
|
||||||
@ -156,7 +156,7 @@ private:
|
|||||||
else
|
else
|
||||||
reinterpret_cast<PlaceholderT*>(holder)->~PlaceholderT();
|
reinterpret_cast<PlaceholderT*>(holder)->~PlaceholderT();
|
||||||
|
|
||||||
if (clear) std::memset(holder, 0, sizeof(Placeholder));
|
if (clear) std::memset(holder, 0, sizeof(holder));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user