summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-08 15:45:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-09 10:16:01 +0000
commitc7b0117f26a386c98a721ff3897479c268103d74 (patch)
tree079aeedb4428475ca03d576776eea4085bed54de /vcl
parente8b2aad1cb2107304761e68aa380b5c29d8ef22f (diff)
extend to cover the last byte needed
Change-Id: I5177d42b47a4bca614878dce4a69ab16b5cfe163
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/fontsubset/sft.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 36c3ae73d602..a00fe2a7b779 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1505,7 +1505,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if (facenum >= GetUInt32(t->ptr, 8)) {
return SF_FONTNO;
}
- if (withinBounds(12, 0, 4 * facenum, t->fsize)) {
+ if (withinBounds(12, 4 * facenum, sizeof(sal_uInt32), t->fsize)) {
tdoffset = GetUInt32(t->ptr, 12 + 4 * facenum);
} else {
return SF_FONTNO;