Mageia Bugzilla – Attachment 2722 Details for
Bug 6723
[Update Request] wine - fix buffer overflow when trying to open document in MSO 2003 apps [mga2]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to fix Open/Save As dialogs in MSO 2003
wine-1.4.1-pidl-string-len-fix.patch (text/plain), 764 bytes, created by
Oleg Bosis
on 2012-09-02 10:11:08 CEST
(
hide
)
Description:
Patch to fix Open/Save As dialogs in MSO 2003
Filename:
MIME Type:
Creator:
Oleg Bosis
Created:
2012-09-02 10:11:08 CEST
Size:
764 bytes
patch
obsolete
>--- a/dlls/shell32/pidl.c 2012-06-15 19:17:00.000000000 +0000 >+++ b/dlls/shell32/pidl.c 2012-09-02 07:25:30.995938849 +0000 >@@ -1752,16 +1752,18 @@ > LPITEMIDLIST _ILCreateEntireNetwork(void) > { > LPITEMIDLIST pidlOut; >+ DWORD alen = sizeof("Entire Network"); > > 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[alen])); >+ > 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", alen + 1); > } > return pidlOut; > }
--- a/dlls/shell32/pidl.c 2012-06-15 19:17:00.000000000 +0000 +++ b/dlls/shell32/pidl.c 2012-09-02 07:25:30.995938849 +0000 @@ -1752,16 +1752,18 @@ LPITEMIDLIST _ILCreateEntireNetwork(void) { LPITEMIDLIST pidlOut; + DWORD alen = sizeof("Entire Network"); 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[alen])); + 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", alen + 1); } return pidlOut; }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6723
: 2722