SHA256
1
0
forked from pool/wine

current patch

OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=19
This commit is contained in:
Marcus Meissner 2010-02-18 14:54:17 +00:00 committed by Git OBS Bridge
parent 0173352b0a
commit 3ea36eace3

View File

@ -1,7 +1,7 @@
From 90d67c1a637fd0804fc7e9eaacaf3b0e2e863e17 Mon Sep 17 00:00:00 2001
From 4832105237c48b22caaaecd24f2b48e4c2b9bc8e Mon Sep 17 00:00:00 2001
From: Marcus Meissner <meissner@suse.de>
Date: Mon, 15 Feb 2010 17:23:05 +0100
Subject: [PATCH 1/2] shell32: replace strcpy by memcpy due to slightly undefined struct handling
Subject: [PATCH] shell32: replace strcpy by memcpy due to slightly undefined struct handling
Hi,
@ -13,19 +13,26 @@ better use memcpy.
Ciao, Marcus
---
dlls/shell32/pidl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
dlls/shell32/pidl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 3e61144..a7704b3 100644
index 3e61144..4b8858b 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -1606,7 +1606,7 @@ LPITEMIDLIST _ILCreateEntireNetwork(void)
@@ -1600,13 +1600,13 @@ LPITEMIDLIST _ILCreateEntireNetwork(void)
TRACE("\n");
- pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[sizeof("Entire Network")]));
+ pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[strlen("Entire Network")+1]));
if (pidlOut)
{
LPPIDLDATA pData = _ILGetDataPointer(pidlOut);
pData->u.network.dummy = 0;
- strcpy(pData->u.network.szNames, "Entire Network");
+ memcpy(pData->u.network.szNames, "Entire Network", sizeof("Entire Network")+1);
+ memcpy(pData->u.network.szNames, "Entire Network", strlen("Entire Network")+1);
}
return pidlOut;
}