From b867bc357aa5c3825b1effecf485635c963f4863 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 2 Nov 2023 14:58:13 +0000 Subject: 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. --- pkgs/applications/emulators/zsnes/fortify3.patch | 9 --------- 1 file changed, 9 deletions(-) (limited to 'pkgs/applications/emulators') diff --git a/pkgs/applications/emulators/zsnes/fortify3.patch b/pkgs/applications/emulators/zsnes/fortify3.patch index 83a67b8b7e879..cbd55a1c7af16 100644 --- a/pkgs/applications/emulators/zsnes/fortify3.patch +++ b/pkgs/applications/emulators/zsnes/fortify3.patch @@ -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); -- cgit 1.4.1