diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-26 09:44:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-26 09:48:00 +0100 |
commit | 1ea13f5c953bc388d1615c61113326532e6a1b01 (patch) | |
tree | 6fdd895e1d563c65279a5250e3924324a027e73e /svx | |
parent | ac35f0e1cc6166005f6bbd3ab8aecbc4e9745bc2 (diff) |
coverity#1194914 Overflowed return value
Change-Id: Ic7ec1238a85fd0395aeccc8a10e5f27c63deae95
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index fd140a8c28e9..dbafe5270166 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -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; |