b5ba305851
Catch up with xpdf 3.00 pl2 and pl3 for various vulnerabilities, and a fix for CAN-2005-2097 from Kristian Hoegsberg. ok mbalmer@, pvalchev@
57 lines
1.6 KiB
Plaintext
57 lines
1.6 KiB
Plaintext
$OpenBSD: patch-xpdf_GPOutputDev_cc,v 1.1 2005/08/22 22:37:12 naddy Exp $
|
|
--- xpdf/GPOutputDev.cc.orig Sat Aug 20 22:36:27 2005
|
|
+++ xpdf/GPOutputDev.cc Sat Aug 20 22:38:32 2005
|
|
@@ -257,26 +257,14 @@ GnomeFontFace *GPOFontMap::getFontFaceEm
|
|
}
|
|
case fontTrueType: {
|
|
FoFiTrueType *ff;
|
|
- gint fd;
|
|
- gchar *temp_name;
|
|
- FILE *f;
|
|
gushort *code_to_gid;
|
|
|
|
ff = FoFiTrueType::make((char *)contents, length); // FIXME error handling
|
|
|
|
code_to_gid = ((Gfx8BitFont *)font)->getCodeToGIDMap(ff); // this is g(oo)malloc'd
|
|
|
|
- fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
|
|
- f = fdopen(fd, "wb");
|
|
- ff->writeTTF(&fileWrite, f);
|
|
delete ff;
|
|
- g_free(contents);
|
|
- fclose(f);
|
|
|
|
- g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
|
|
- unlink(temp_name);
|
|
- g_free(temp_name);
|
|
-
|
|
gff = gpdf_font_face_download((const guchar *)font_name,
|
|
(const guchar *)"",
|
|
GNOME_FONT_REGULAR, FALSE,
|
|
@@ -318,25 +306,8 @@ GnomeFontFace *GPOFontMap::getFontFaceEm
|
|
break;
|
|
}
|
|
case fontCIDType2: {
|
|
- FoFiTrueType *ff;
|
|
- gint fd;
|
|
- gchar *temp_name;
|
|
- FILE *f;
|
|
gint n_cids;
|
|
gushort *code_to_gid;
|
|
-
|
|
- ff = FoFiTrueType::make((char *)contents, length); // FIXME error handling
|
|
-
|
|
- fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
|
|
- f = fdopen(fd, "wb");
|
|
- ff->writeTTF(&fileWrite, f);
|
|
- delete ff;
|
|
- g_free(contents);
|
|
- fclose(f);
|
|
-
|
|
- g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
|
|
- unlink(temp_name);
|
|
- g_free(temp_name);
|
|
|
|
gff = gpdf_font_face_download((const guchar *)font_name,
|
|
(const guchar *)"",
|