mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
BLOCKS: Fixed a potential memory overflow in a recent commit
This commit is contained in:
parent
8e7a2072eb
commit
9c5cd5a188
1 changed files with 6 additions and 1 deletions
|
|
@ -363,8 +363,13 @@ struct PhysicalTopologySource::Internal
|
|||
static bool versionNumberAddedToBlock (const juce::Array<DeviceInfo>& devices, Block::UID uid, juce::String version) noexcept
|
||||
{
|
||||
for (auto&& d : devices)
|
||||
if (d.uid == uid && memcmp (d.version.version, version.toRawUTF8(), d.version.length) != 0)
|
||||
{
|
||||
String deviceVersion (reinterpret_cast<const char*> (d.version.version),
|
||||
jmin (static_cast<size_t> (d.version.length), sizeof (d.version.version)));
|
||||
|
||||
if (d.uid == uid && deviceVersion != version)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue