mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
9ac6401366
No idea which patch(es) fixes the segfault, don't really care to find out. Signed-off-by: Erik Hanson <erik@slackbuilds.org>
37 lines
1,005 B
Diff
37 lines
1,005 B
Diff
From 0a6e8aabcc46d47b5d84e5414cd0e07d57ef171b Mon Sep 17 00:00:00 2001
|
|
From: José Aliste <jaliste@src.gnome.org>
|
|
Date: Mon, 17 Jan 2011 17:30:00 +0000
|
|
Subject: Fix problem with some pk fonts.
|
|
|
|
---
|
|
diff --git a/backend/dvi/mdvi-lib/pk.c b/backend/dvi/mdvi-lib/pk.c
|
|
index 08377e6..a911613 100644
|
|
--- a/backend/dvi/mdvi-lib/pk.c
|
|
+++ b/backend/dvi/mdvi-lib/pk.c
|
|
@@ -328,13 +328,14 @@ static int pk_load_font(DviParams *unused, DviFont *font)
|
|
{
|
|
int i;
|
|
int flag_byte;
|
|
- int loc, hic, maxch;
|
|
+ int hic, maxch;
|
|
Int32 checksum;
|
|
FILE *p;
|
|
#ifndef NODEBUG
|
|
char s[256];
|
|
#endif
|
|
long alpha, beta, z;
|
|
+ unsigned int loc;
|
|
|
|
font->chars = xnalloc(DviFontChar, 256);
|
|
p = font->in;
|
|
@@ -521,7 +522,7 @@ static int pk_load_font(DviParams *unused, DviFont *font)
|
|
}
|
|
|
|
/* resize font char data */
|
|
- if(loc > 0 && hic < maxch-1) {
|
|
+ if(loc > 0 || hic < maxch-1) {
|
|
memmove(font->chars, font->chars + loc,
|
|
(hic - loc + 1) * sizeof(DviFontChar));
|
|
font->chars = xresize(font->chars,
|
|
--
|
|
cgit v0.8.3.1
|