https://bugs.winehq.org/show_bug.cgi?id=50951
Bug ID: 50951 Summary: Possible Crash because of wrong initialization of struct COMBOBOXEXITEM Product: Wine Version: 6.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: api-ms-win-* Assignee: wine-bugs@winehq.org Reporter: taxpool@protonmail.ch Distribution: ---
//BUG #1: cchTextMax member of COMBOBOXEXITEM is always 0 (in Windows 260) //BUG #2: Text can't be copied to pszText
void CMyCombo::GetCBDispString(NMHDR* pNMHDR, LRESULT* pResult) { NMCOMBOBOXEX* pncbe = reinterpret_cast<NMCOMBOBOXEX*>(pNMHDR); COMBOBOXEXITEM& cbei = pncbe->ceItem; if (cbei.mask & CBEIF_TEXT) { //strcpy(cbei.pszText, "xxx"); //CRASH cbei.pszText = "xxx"; //WORKS
//cbei.mask |= CBEIF_DI_SETITEM; }
*pResult = 0; }