mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
audiovisualizer: shader: Fix dframe out of bound write
shader_fade_and_move_horiz_out writes a complete stride at the end of its dframe data This led to SIGSEGV since the stride reached into sframe->map[0]->memory which could not be umpapped later on. This is due to `d` is increased twice. Once at the end of the upper loop and at the start of the lower loop. The corresponding dframe stride is therefore skipped. Rewind `d` and start at the correct position. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1702 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1765>
This commit is contained in:
parent
3e02d2af15
commit
d6a5711423
1 changed files with 4 additions and 0 deletions
|
@ -336,6 +336,10 @@ shader_fade_and_move_horiz_out (GstAudioVisualizer * scope,
|
||||||
}
|
}
|
||||||
d += ds;
|
d += ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* rewind one stride */
|
||||||
|
d -= ds;
|
||||||
|
|
||||||
/* move lower half down */
|
/* move lower half down */
|
||||||
for (j = 0; j < height / 2; j++) {
|
for (j = 0; j < height / 2; j++) {
|
||||||
d += ds;
|
d += ds;
|
||||||
|
|
Loading…
Reference in a new issue