mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
zsnes: amend fortify3 patch and fix initialization
I was too eager fixing out-of-bounds access and did not notice that loop increment is `+= 4` instead of `+= 1`. The loop condition was fine as is.
This commit is contained in:
parent
dbb68f0b49
commit
b867bc357a
@ -18,12 +18,3 @@ Detected by _FORTIFY_SOURCE=3:
|
||||
extern unsigned char SPCRAM[65472];
|
||||
unsigned char *SPCState = SPCRAM;
|
||||
|
||||
@@ -1456,7 +1456,7 @@ void clearmem()
|
||||
memset(pal16b, 0, 1024);
|
||||
memset(pal16bcl, 0, 1024);
|
||||
memset(pal16bclha, 0, 1024);
|
||||
- for (i=0 ; i<1024 ; i+=4)
|
||||
+ for (i=0 ; i<1024-4 ; i+=4)
|
||||
{
|
||||
memset(pal16bxcl+i, 255, 2);
|
||||
memset(pal16bxcl+i+2, 0, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user