Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wstringop-overflow from gcc-14 #616

Open
sezero opened this issue May 31, 2024 · 1 comment
Open

-Wstringop-overflow from gcc-14 #616

sezero opened this issue May 31, 2024 · 1 comment

Comments

@sezero
Copy link
Contributor

sezero commented May 31, 2024

As inlined below

In file included from /tmp/SDL_mixer/src/codecs/minimp3/minimp3_ex.h:10,
                 from /tmp/SDL_mixer/src/codecs/music_minimp3.c:29:
In function 'L3_decode_scalefactors',
    inlined from 'L3_decode' at /tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:1245:9,
    inlined from 'mp3dec_decode_frame' at /tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:1773:17:
/home/ozzie/2/SDL_mixer/src/codecs/minimp3/minimp3.h:695:42: warning: writing 2 bytes into a region of size 1 [-Wstringop-overflow=]
  695 |             iscf[gr->n_long_sfb + i + 0] += gr->subblock_gain[0] << sh;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SDL_mixer/src/codecs/minimp3/minimp3.h: In function 'mp3dec_decode_frame':
/tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:662:26: note: at offset [39, 40] into destination object 'iscf' of size 40
  662 |     uint8_t scf_size[4], iscf[40];
      |                          ^~~~
In function 'L3_decode_scalefactors',
    inlined from 'L3_decode' at /tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:1245:9,
    inlined from 'mp3dec_decode_frame' at /tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:1773:17:
/tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:697:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  697 |             iscf[gr->n_long_sfb + i + 2] += gr->subblock_gain[2] << sh;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SDL_mixer/src/codecs/minimp3/minimp3.h: In function 'mp3dec_decode_frame':
/tmp/SDL_mixer/src/codecs/minimp3/minimp3.h:662:26: note: at offset [41, 296] into destination object 'iscf' of size 40
  662 |     uint8_t scf_size[4], iscf[40];
      |                          ^~~~
@sezero
Copy link
Contributor Author

sezero commented May 31, 2024

Also reported to minimp3 mainstream as lieff/minimp3#119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant