[vlc-commits] zvbi: return actual last visible row
Hannes Domani
git at videolan.org
Sun Nov 29 21:38:11 CET 2015
vlc/vlc-2.2 | branch: master | Hannes Domani <ssbssa at yahoo.de> | Mon Sep 15 16:50:36 2014 +0200| [6f94249aca3dce44cc93dcc3e83ea5b23b046346] | committer: Jean-Baptiste Kempf
zvbi: return actual last visible row
Currently in most cases the row after the last is returned.
When the last row is visible vbi_draw_vt_page_region() could
crash, because it went over the size of p_page.text and use
invalid values (>=40) as index for p_page.color_map.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 59c8ec8a549dbd9b626128024d16fb2017683ff0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=6f94249aca3dce44cc93dcc3e83ea5b23b046346
---
modules/codec/zvbi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index b967f00..51272b5 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -615,7 +615,7 @@ static int get_last_visible_row( vbi_char *p_text, int rows, int columns)
{
if (p_text[i].opacity != VBI_TRANSPARENT_SPACE)
{
- return ( i + columns - 1) / columns;
+ return i / columns;
}
}
More information about the vlc-commits
mailing list