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-09 10:07:40 +0200 |
commit | 0edb39a63b3bcb1a4e2540b1206eb711ac49d848 (patch) | |
tree | 156553eafd1220a336535b2cd5886d6d4d8994a1 | |
parent | 3e59c01644f3a1e9a5ba15c1f3e37ce0ead50c25 (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)
-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 571855dde2b5..0898475e90b2 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -599,6 +599,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) |