Added patch to fix possible invalid memory access in wordpad.

This commit is contained in:
Sebastian Lackner 2014-11-30 03:26:45 +01:00
parent 2e2178f595
commit d7a1c87111
2 changed files with 30 additions and 1 deletions

View File

@ -197,7 +197,8 @@ Exagear.ok: ntdll-WRITECOPY.ok
# |
# | Modified files:
# | * dlls/d3d9/tests/visual.c, dlls/kernel32/locale.c, dlls/netapi32/netapi32.c, dlls/winealsa.drv/mmdevdrv.c,
# | dlls/wined3d/glsl_shader.c, dlls/wined3d/resource.c, dlls/wined3d/swapchain.c, tools/makedep.c
# | dlls/wined3d/glsl_shader.c, dlls/wined3d/resource.c, dlls/wined3d/swapchain.c, programs/wordpad/registry.c,
# | tools/makedep.c
# |
.INTERMEDIATE: Miscellaneous.ok
Miscellaneous.ok:
@ -205,11 +206,13 @@ Miscellaneous.ok:
$(call APPLY_FILE,Miscellaneous/0002-kernel32-Silence-repeated-CompareStringEx-FIXME.patch)
$(call APPLY_FILE,Miscellaneous/0003-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch)
$(call APPLY_FILE,Miscellaneous/0004-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch)
$(call APPLY_FILE,Miscellaneous/0005-wordpad-Check-for-array-index-before-using-it-in-reg.patch)
@( \
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },'; \
echo '+ { "Sebastian Lackner", "kernel32: Silence repeated CompareStringEx FIXME.", 1 },'; \
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },'; \
echo '+ { "Erich E. Hoover", "Appease the blessed version of gcc (4.5) when -Werror is enabled.", 1 },'; \
echo '+ { "Gerald Pfeifer", "wordpad: Check for array index before using it in registry_set_filelist.", 1 },'; \
) > Miscellaneous.ok
# Patchset Pipelight

View File

@ -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