SHA256
1
0
forked from pool/wine
Marcus Meissner 2010-02-16 16:37:50 +00:00 committed by Git OBS Bridge
parent fb94ff2fa6
commit 988eafd067
3 changed files with 36 additions and 3 deletions

View File

@ -0,0 +1,34 @@
From 90d67c1a637fd0804fc7e9eaacaf3b0e2e863e17 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
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 3e61144..a7704b3 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -1606,7 +1606,7 @@ LPITEMIDLIST _ILCreateEntireNetwork(void)
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);
}
return pidlOut;
}
--
1.6.6.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf11770cd18d45d2f56235efb0f17c82d24faae43383e1d99b2975dcff3ec8a6
size 16233995

View File

@ -30,6 +30,7 @@ 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} .
#