[Bug 47969] Taiga: Crushes on changing the grouping in seasons

WineHQ Bugzilla wine-bugs at winehq.org
Thu Nov 28 01:10:51 CST 2019


https://bugs.winehq.org/show_bug.cgi?id=47969

--- Comment #5 from Nikolay Sivov <bunglehead at gmail.com> ---
Not sure if it's the same crash, but I get one after moving cursor over "Group
By" button. It's crashing in toolbar code after receiving NULL pointer for
button tooltip. Relevant application code:

---
    // Show tooltips
    case TBN_GETINFOTIP: {
      NMTBGETINFOTIP* git = reinterpret_cast<NMTBGETINFOTIP*>(lParam);
      git->cchTextMax = INFOTIPSIZE;
      if (git->hdr.hwndFrom == toolbar_.GetWindowHandle()) {
        git->pszText =
const_cast<LPWSTR>(toolbar_.GetButtonTooltip(git->lParam));
      }
      break;
    }
---

C++ control wrappers are provided by another library by the same author,
relevant method from there:

---
LPCWSTR Toolbar::GetButtonTooltip(int index) {
  if (index < static_cast<int>(tooltip_text_.size()))
    if (!tooltip_text_[index].empty())
      return tooltip_text_[index].c_str();

  return nullptr;
}
---

Current we do lstrlenW() on returned pointer and crash. I verified there's no
tooltip when running on Windows.

Patch sent
https://www.winehq.org/pipermail/wine-devel/2019-November/155707.html

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list