rpms/openoffice.org/F-12 openoffice.org-3.2.0.ooo107552.vcl.sft.patch, NONE, 1.1
Caolan McNamara
caolanm at fedoraproject.org
Wed Dec 9 10:36:36 UTC 2009
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14444
Added Files:
openoffice.org-3.2.0.ooo107552.vcl.sft.patch
Log Message:
Resolves: rhbz#544218 add openoffice.org-3.2.0.ooo107552.vcl.sft.patc
openoffice.org-3.2.0.ooo107552.vcl.sft.patch:
sft.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
--- NEW FILE openoffice.org-3.2.0.ooo107552.vcl.sft.patch ---
--- psprint/source/fontsubset/sft.c 2009-12-09 09:40:40.000000000 +0000
+++ psprint/source/fontsubset/sft.c 2009-12-09 10:14:32.000000000 +0000
@@ -1101,6 +1101,14 @@
sal_uInt8 *table = getTable(t, O_name);
int nTableSize = getTableSize(t, O_name);
+ if (nTableSize < 4)
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf(stderr, "O_name table too small\n");
+#endif
+ return;
+ }
+
sal_uInt16 n = GetUInt16(table, 2, 1);
int i, r;
sal_Bool bPSNameOK = sal_True;
@@ -1693,7 +1701,6 @@
goto cleanup;
}
-
if (((*ttf)->ptr = (sal_uInt8 *) mmap(0, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
ret = SF_MEMORY;
goto cleanup;
@@ -2700,7 +2707,7 @@
}
table = getTable(ttf, O_post);
- if (table) {
+ if (table && getTableSize(ttf, O_post) >= 12+sizeof(sal_uInt32)) {
info->pitch = GetUInt32(table, 12, 1);
info->italicAngle = GetInt32(table, 4, 1);
}
@@ -2808,6 +2815,15 @@
{
sal_uInt8 *table = getTable(ttf, O_name);
int nTableSize = getTableSize(ttf, O_name );
+
+ if (nTableSize < 6)
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf(stderr, "O_name table too small\n");
+#endif
+ return 0;
+ }
+
sal_uInt16 n = GetUInt16(table, 2, 1);
sal_uInt8* rec_string = NULL;
int nStrBase = GetUInt16(table, 4, 1);
More information about the fedora-extras-commits
mailing list