Kaydet (Commit) 1ea13f5c authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1194914 Overflowed return value

Change-Id: Ic7ec1238a85fd0395aeccc8a10e5f27c63deae95
üst ac35f0e1
......@@ -4170,7 +4170,8 @@ sal_Int16 SAL_CALL FmXListBoxCell::getSelectedItemPos() throw( RuntimeException,
{
UpdateFromColumn();
sal_Int32 nPos = m_pBox->GetSelectEntryPos();
assert(nPos < SHRT_MAX);
if (nPos > SHRT_MAX || nPos < SHRT_MIN)
throw std::out_of_range("awt::XListBox::getSelectedItemPos can only return a short");
return nPos;
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment