From ea949759ebd8be79142dad39546df206788933e006d6c509458b0942feca7bf4 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 18 Feb 2010 16:34:51 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/wine revision 68.0 OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=40904756f548e696fe183a67f4a5ecd5 --- ...strcpy-by-memcpy-due-to-slightly-und.patch | 41 +++++++++++++++++++ wine.changes | 5 +++ wine.spec | 4 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 0001-shell32-replace-strcpy-by-memcpy-due-to-slightly-und.patch diff --git a/0001-shell32-replace-strcpy-by-memcpy-due-to-slightly-und.patch b/0001-shell32-replace-strcpy-by-memcpy-due-to-slightly-und.patch new file mode 100644 index 0000000..8c9f373 --- /dev/null +++ b/0001-shell32-replace-strcpy-by-memcpy-due-to-slightly-und.patch @@ -0,0 +1,41 @@ +From 4832105237c48b22caaaecd24f2b48e4c2b9bc8e Mon Sep 17 00:00:00 2001 +From: Marcus Meissner +Date: Mon, 15 Feb 2010 17:23:05 +0100 +Subject: [PATCH] shell32: replace strcpy by memcpy due to slightly undefined struct handling + +Hi, + +Writing over the end of a struct is only clearly defined if the struct +is standalone and not contained in another. + +So for gcc 4.5 the strcpy triggers a fortify overflow error and we +better use memcpy. + +Ciao, Marcus +--- + 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..4b8858b 100644 +--- a/dlls/shell32/pidl.c ++++ b/dlls/shell32/pidl.c +@@ -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", strlen("Entire Network")+1); + } + return pidlOut; + } +-- +1.6.6.1 + diff --git a/wine.changes b/wine.changes index 141448a..d5e04bc 100644 --- a/wine.changes +++ b/wine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 18 17:25:22 CET 2010 - meissner@suse.de + +- fixed gcc 4.5 issue + ------------------------------------------------------------------- Fri Feb 5 20:27:26 CET 2010 - meissner@suse.de diff --git a/wine.spec b/wine.spec index ce452ce..2255e8a 100644 --- a/wine.spec +++ b/wine.spec @@ -23,13 +23,14 @@ License: LGPLv2.1+ Group: System/Emulators/PC AutoReqProv: on Version: 1.1.38 -Release: 1 +Release: 2 Summary: An MS Windows Emulator Url: http://www.winehq.com Source0: wine-%version.tar.bz2 Source1: http://kegel.com/wine/winetricks Source3: README.SuSE Source4: wine.desktop +Patch0: 0001-shell32-replace-strcpy-by-memcpy-due-to-slightly-und.patch Recommends: wine-gecko BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: libXcursor.so.1 libXi.so.6 libXxf86vm.so.1 libXrender.so.1 libXrandr.so.2 libXinerama.so.1 libXcomposite.so.1 libxslt.so.1 libhal.so.1 libncurses.so.5 libfreetype.so.6 libpng12.so.0 libjpeg.so.62 libcrypto.so.0.9.8 libssl.so.0.9.8 libfontconfig.so.1 libcups.so.2 libgnutls.so.26 @@ -65,6 +66,7 @@ libraries. %prep %setup -q +%patch0 -p1 # cp %{S:3} . #