diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 266c444..fd28488 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -1753,13 +1753,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; }