aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts/libXfont
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2012-03-13 19:58:38 +0800
committerkwm <kwm@FreeBSD.org>2012-03-13 19:58:38 +0800
commit97f825b1e1aae8049b0a1b283282adeefc155304 (patch)
tree1fcdf7f4cfe86d12855779348587dccc143c9c93 /x11-fonts/libXfont
parenta39ac6f0a4edfc9c379aba3e1e571251bd041844 (diff)
downloadfreebsd-ports-gnome-97f825b1e1aae8049b0a1b283282adeefc155304.tar.gz
freebsd-ports-gnome-97f825b1e1aae8049b0a1b283282adeefc155304.tar.zst
freebsd-ports-gnome-97f825b1e1aae8049b0a1b283282adeefc155304.zip
Fix patching.
Submitted by: Sebastien Santoro <dereckson@espace-win.org> Jan Henrik Sylvester <me@janh.de> Feature safe: yes
Diffstat (limited to 'x11-fonts/libXfont')
-rw-r--r--x11-fonts/libXfont/files/patch-src_fontfile_decompress.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c
index 1cfa1fa62235..7499041631fa 100644
--- a/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c
+++ b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c
@@ -10,12 +10,10 @@ no good reason. It's derived from a change in libarchive from 2004.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Tomas Hoger <thoger@redhat.com>
----
-diff --git a/src/fontfile/decompress.c b/src/fontfile/decompress.c
-index 0f28c3f..6405d76 100644
---- src/fontfile/decompress.c
-+++ src/fontfile/decompress.c
-@@ -97,7 +97,7 @@ static char_type magic_header[] = { "\037\235" }; /* 1F 9D */
+
+--- src/fontfile/decompress.c.orig 2011-08-10 22:22:01.000000000 +0200
++++ src/fontfile/decompress.c 2012-03-13 12:55:35.000000000 +0100
+@@ -97,7 +97,7 @@ static char_type magic_header[] = { "\03
#define FIRST 257 /* first free entry */
#define CLEAR 256 /* table clear output code */
@@ -50,7 +48,7 @@ index 0f28c3f..6405d76 100644
code = getcode (file);
if (code == -1)
break;
-@@ -241,26 +236,34 @@ BufCompressedFill (BufFilePtr f)
+@@ -241,26 +236,35 @@ BufCompressedFill (BufFilePtr f)
for ( code = 255; code >= 0; code-- )
file->tab_prefix[code] = 0;
file->clear_flg = 1;
@@ -73,13 +71,15 @@ index 0f28c3f..6405d76 100644
*stackp++ = finchar;
code = oldcode;
}
+-
++
+ /*
+ * The above condition ensures that code < free_ent.
+ * The construction of tab_prefixof in turn guarantees that
+ * each iteration decreases code and therefore stack usage is
+ * bound by 1 << BITS - 256.
+ */
-
++
/*
* Generate output characters in reverse order
*/
@@ -90,7 +90,7 @@ index 0f28c3f..6405d76 100644
*stackp++ = file->tab_suffix[code];
code = file->tab_prefix[code];
}
-@@ -270,7 +273,7 @@ BufCompressedFill (BufFilePtr f)
+@@ -270,7 +274,7 @@ BufCompressedFill (BufFilePtr f)
/*
* Generate the new entry.
*/
@@ -99,5 +99,3 @@ index 0f28c3f..6405d76 100644
file->tab_prefix[code] = (unsigned short)oldcode;
file->tab_suffix[code] = finchar;
file->free_ent = code+1;
---
-cgit v0.9.0.2-2-gbebe