diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-04-24 21:22:47 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-05-13 14:56:04 +0200 |
commit | 897eba11834c284dc1d793d0888032955cf0d199 (patch) | |
tree | f77ba8d33816b02bbc237929ac08a68fe1d36e76 /vcl | |
parent | 66db524e533ed3bae524edec917e328c0999704b (diff) |
ofz#46905 Null-dereference
Change-Id: I26427ee1e010ce79e40c550459d9f53598570a7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133291
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 5f1d341779b9a773e3147542f6b80d4b3547bb43)
(cherry picked from commit 0edb39a63b3bcb1a4e2540b1206eb711ac49d848)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/textline.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 22e7db6230a1..3c7d913561f1 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -612,6 +612,8 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY, int nStrikeStrLen = (nWidth+(nStrikeoutWidth-1)) / nStrikeoutWidth; if( nStrikeStrLen > nMaxStrikeStrLen ) nStrikeStrLen = nMaxStrikeStrLen; + else if (nStrikeStrLen < 0) + nStrikeStrLen = 0; // build the strikeout string for( int i = nTestStrLen; i < nStrikeStrLen; ++i) |