notaz.gp2x.de
/
libpicofe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
533726d
)
fix a buffer overflow
author
kub
<derkub@gmail.com>
Fri, 4 Mar 2022 19:39:44 +0000
(19:39 +0000)
committer
kub
<derkub@gmail.com>
Fri, 4 Mar 2022 19:39:44 +0000
(19:39 +0000)
plat_sdl.c
patch
|
blob
|
blame
|
history
diff --git
a/plat_sdl.c
b/plat_sdl.c
index
729a0b0
..
a167a63
100644
(file)
--- a/
plat_sdl.c
+++ b/
plat_sdl.c
@@
-365,10
+365,10
@@
void plat_sdl_overlay_clear(void)
int *dst = (int *)plat_sdl_overlay->pixels[0];
int v = 0x10801080;
- for (; pixels >
0
; dst += 4, pixels -= 2 * 4)
+ for (; pixels >
7
; dst += 4, pixels -= 2 * 4)
dst[0] = dst[1] = dst[2] = dst[3] = v;
- for (; pixels >
0
; dst++, pixels -= 2)
+ for (; pixels >
1
; dst++, pixels -= 2)
*dst = v;
}