Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
44f42204
Kaydet (Commit)
44f42204
authored
Haz 06, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use sfntLen in DumpSfnts to do some sanity checking
Change-Id: Ic3b196f925a1699f02ad9a5c1183ea767e3e91cf
üst
e990e4d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
sft.cxx
vcl/source/fontsubset/sft.cxx
+12
-4
No files found.
vcl/source/fontsubset/sft.cxx
Dosyayı görüntüle @
44f42204
...
@@ -2091,7 +2091,6 @@ static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
...
@@ -2091,7 +2091,6 @@ static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
assert
(
numTables
<=
9
);
/* Type42 has 9 required tables */
assert
(
numTables
<=
9
);
/* Type42 has 9 required tables */
sal_uInt32
*
offs
=
(
sal_uInt32
*
)
scalloc
(
numTables
,
sizeof
(
sal_uInt32
));
sal_uInt32
*
offs
=
(
sal_uInt32
*
)
scalloc
(
numTables
,
sizeof
(
sal_uInt32
));
// sal_uInt32* lens = (sal_uInt32*)scalloc(numTables, sizeof(sal_uInt32));
fputs
(
"/sfnts ["
,
outf
);
fputs
(
"/sfnts ["
,
outf
);
HexFmtOpenString
(
h
);
HexFmtOpenString
(
h
);
...
@@ -2099,9 +2098,18 @@ static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
...
@@ -2099,9 +2098,18 @@ static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
HexFmtBlockWrite
(
h
,
sfntP
+
12
,
16
*
numTables
);
/* stream out the Table Directory */
HexFmtBlockWrite
(
h
,
sfntP
+
12
,
16
*
numTables
);
/* stream out the Table Directory */
for
(
i
=
0
;
i
<
numTables
;
i
++
)
{
for
(
i
=
0
;
i
<
numTables
;
i
++
)
{
sal_uInt32
tag
=
GetUInt32
(
sfntP
+
12
,
16
*
i
,
1
);
sal_uInt32
nLargestFixedOffsetPos
=
12
+
16
*
i
+
12
;
sal_uInt32
off
=
GetUInt32
(
sfntP
+
12
,
16
*
i
+
8
,
1
);
sal_uInt32
nMinSize
=
nLargestFixedOffsetPos
+
sizeof
(
sal_uInt32
);
sal_uInt32
len
=
GetUInt32
(
sfntP
+
12
,
16
*
i
+
12
,
1
);
if
(
nMinSize
>
sfntLen
)
{
SAL_WARN
(
"vcl.fonts"
,
"DumpSfnts claimed to have "
<<
numTables
<<
" tables, but only space for "
<<
i
);
break
;
}
sal_uInt32
tag
=
GetUInt32
(
sfntP
,
12
+
16
*
i
,
1
);
sal_uInt32
off
=
GetUInt32
(
sfntP
,
12
+
16
*
i
+
8
,
1
);
sal_uInt32
len
=
GetUInt32
(
sfntP
,
12
+
16
*
i
+
12
,
1
);
if
(
tag
!=
T_glyf
)
{
if
(
tag
!=
T_glyf
)
{
HexFmtBlockWrite
(
h
,
sfntP
+
off
,
len
);
HexFmtBlockWrite
(
h
,
sfntP
+
off
,
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment