Skip to content

[A2M v2] Fix some warnings given by Coverity#235

Merged
binarymaster merged 4 commits into
adplug:masterfrom
dmitrysmagin:a2mv2-coverity
Aug 29, 2024
Merged

[A2M v2] Fix some warnings given by Coverity#235
binarymaster merged 4 commits into
adplug:masterfrom
dmitrysmagin:a2mv2-coverity

Conversation

@dmitrysmagin

@dmitrysmagin dmitrysmagin commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

Coverity shows a lot of warnings for a2m-v2.cpp (possible overruns etc), will try to handle them here.

What's fixed:

  • Resource leak Coverity warning (memory leak when reading corrupt tune)
  • Missing break in switch Coverity warning (low chance of executing though)
  • Out-of-bounds Coverity warning; added more range checks in set_ins_volume()
  • Always true branch Coverity warning: fixed macro vibrato for the instruments, most prominent in ab_julia.a2t and fm63b_rv.a2m tunes; also updated refs for tests
  • Now properly initialize some buffers before playing with (-1) value, this fixes &2?, &3?, ZC? and ZD? effects (notecut, note delay and pattern loop)

Comment thread src/a2m-v2.cpp
Comment thread src/a2m-v2.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants