You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to fix possible invalid memory access in wordpad.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From 47bc6db7c7dcb5c396b505dbb3c18263858122d9 Mon Sep 17 00:00:00 2001
|
||||
From: Gerald Pfeifer <gerald@pfeifer.com>
|
||||
Date: Sat, 29 Nov 2014 12:59:26 +0100
|
||||
Subject: wordpad: Check for array index before using it in
|
||||
registry_set_filelist.
|
||||
|
||||
---
|
||||
programs/wordpad/registry.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/programs/wordpad/registry.c b/programs/wordpad/registry.c
|
||||
index 472ed4d..5b570e7 100644
|
||||
--- a/programs/wordpad/registry.c
|
||||
+++ b/programs/wordpad/registry.c
|
||||
@@ -293,7 +293,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
|
||||
|
||||
if(lstrcmpiW(newFile, pFiles[0]))
|
||||
{
|
||||
- for(i = 0; pFiles[i] && i < FILELIST_ENTRIES; i++)
|
||||
+ for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
|
||||
{
|
||||
if(!lstrcmpiW(pFiles[i], newFile))
|
||||
{
|
||||
--
|
||||
2.1.3
|
||||
|
Reference in New Issue
Block a user