diff options
author | Robert Kukla <roolku@rockbox.org> | 2007-04-01 17:28:46 +0000 |
---|---|---|
committer | Robert Kukla <roolku@rockbox.org> | 2007-04-01 17:28:46 +0000 |
commit | 6dbcceb1fef9c3c6b4ec186543ab7ce6e8647df1 (patch) | |
tree | 738670ee5f0db4d0f76806345bf369ecf0b72f01 /firmware/drivers/lcd-2bit-vert.c | |
parent | c67c892cd3351f32aabd84ad4d597ce2c971e62a (diff) | |
download | rockbox-6dbcceb1fef9c3c6b4ec186543ab7ce6e8647df1.tar.gz rockbox-6dbcceb1fef9c3c6b4ec186543ab7ce6e8647df1.zip |
for WPS files with many lines the current wps code will call puts_scroll with y-values greater than the size of the scroll[] array (e.g. gwps-common.c:2063). This is a temporary security measure until viewports and/or wps tokenizer are available...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12992 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-2bit-vert.c')
-rw-r--r-- | firmware/drivers/lcd-2bit-vert.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c index 7a49f35312..37abf0496f 100644 --- a/firmware/drivers/lcd-2bit-vert.c +++ b/firmware/drivers/lcd-2bit-vert.c | |||
@@ -1025,6 +1025,8 @@ void lcd_invertscroll(int x, int y) | |||
1025 | 1025 | ||
1026 | (void)x; | 1026 | (void)x; |
1027 | 1027 | ||
1028 | if(y>=SCROLLABLE_LINES) return; | ||
1029 | |||
1028 | s = &scroll[y]; | 1030 | s = &scroll[y]; |
1029 | s->invert = !s->invert; | 1031 | s->invert = !s->invert; |
1030 | } | 1032 | } |
@@ -1075,6 +1077,8 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
1075 | struct scrollinfo* s; | 1077 | struct scrollinfo* s; |
1076 | int w, h; | 1078 | int w, h; |
1077 | 1079 | ||
1080 | if(y>=SCROLLABLE_LINES) return; | ||
1081 | |||
1078 | s = &scroll[y]; | 1082 | s = &scroll[y]; |
1079 | 1083 | ||
1080 | s->start_tick = current_tick + scroll_delay; | 1084 | s->start_tick = current_tick + scroll_delay; |