Fix floor1 inverse_db_table indexing in stb_vorbis#1973
Open
meta-legend wants to merge 1 commit into
Open
Conversation
2 tasks
sezero
added a commit
to icculus/SDL_sound
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973
sezero
added a commit
to icculus/SDL_sound
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973 (cherry picked from commit 69cce71)
sezero
added a commit
to icculus/SDL_sound
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973 (cherry picked from commit 69cce71)
sezero
added a commit
to libsdl-org/SDL_mixer
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973
sezero
added a commit
to libsdl-org/SDL_mixer
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973 (cherry picked from commit ce30df3)
sezero
added a commit
to libsdl-org/SDL_mixer
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973 (cherry picked from commit 01a5783)
sezero
added a commit
to libsdl-org/SDL_mixer
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973 (cherry picked from commit ce30df3)
sezero
added a commit
to libsdl-org/SDL_mixer
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973
sezero
added a commit
to sezero/stb
that referenced
this pull request
Jul 13, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings#1934. Mainstream P/R nothings#1973
AliceLR
pushed a commit
to libxmp/libxmp
that referenced
this pull request
Jul 14, 2026
CVE-2019-13220 fix added y&255 mask in draw_line(). However, do_floor() has an inline optimization equivalent to draw_line(target,lx,ly,n,ly,n2) without the same mask. draw_line() uses inverse_db_table[y&255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table. c.f.: nothings/stb#1934. Mainstream P/R nothings/stb#1973
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CVE-2019-13220 fix added y&255 mask in draw_line() (lines 2071, 2079). However, "do_floor()" has an inline optimization equivalent to "draw_line(target, lx, ly, n, ly, n2);" without the same mask (line 3104).
"draw_line()" uses inverse_db_table[y & 255], but this doesn't. If bad input causes ly to exceed 255, this can read past the end of inverse_db_table.
Note: my line number labels are off by 1 compared to the issue because I added my name to the contributors list
This also resolves #1934.