Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Audio/SoundCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void DirectX::CreateADPCM(
adpcm->wNumCoef = MSADPCM_NUM_COEFFICIENTS;

static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} };
memcpy(&adpcm->aCoef, aCoef, sizeof(aCoef)); // [CodeQL.SM01947]: Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory.
memcpy(&adpcm->aCoef, aCoef, sizeof(aCoef)); // CodeQL [SM01947] Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory.

assert(IsValid(wfx));
}
Expand Down
2 changes: 1 addition & 1 deletion Audio/WaveBankReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace
fmt->wNumCoef = MSADPCM_NUM_COEFFICIENTS;

static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} };
memcpy(&fmt->aCoef, aCoef, sizeof(aCoef)); // [CodeQL.SM01947]: Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory.
memcpy(&fmt->aCoef, aCoef, sizeof(aCoef)); // CodeQL [SM01947] Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory.
}
};

Expand Down
10 changes: 5 additions & 5 deletions Src/ModelLoadCMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ std::unique_ptr<Model> Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto meshName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
auto meshName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand Down Expand Up @@ -182,7 +182,7 @@ std::unique_ptr<Model> Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto matName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
auto matName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand All @@ -204,7 +204,7 @@ std::unique_ptr<Model> Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto psName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
auto psName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand All @@ -219,7 +219,7 @@ std::unique_ptr<Model> Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto txtName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
auto txtName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand Down Expand Up @@ -458,7 +458,7 @@ std::unique_ptr<Model> Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto boneName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
auto boneName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer.

usedSize += sizeof(wchar_t) * (*nName);
if (dataSize < usedSize)
Expand Down
Loading