diff options
author | marcus <marcus@FreeBSD.org> | 2004-03-26 01:29:54 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-03-26 01:29:54 +0800 |
commit | b80d5cad18faf399e2c714f147f4dd42a4213ae5 (patch) | |
tree | b035b079c854b730f0e9f467f03f19a71d79849f /textproc | |
parent | db0814357b14526e022507d46708e5d182a53d4c (diff) | |
download | freebsd-ports-gnome-b80d5cad18faf399e2c714f147f4dd42a4213ae5.tar.gz freebsd-ports-gnome-b80d5cad18faf399e2c714f147f4dd42a4213ae5.tar.zst freebsd-ports-gnome-b80d5cad18faf399e2c714f147f4dd42a4213ae5.zip |
Fix processing of hex data in RTF files.
Submitted by: Morya Alexander <morya@apexnet.dp.ua>
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/rtfreader/Makefile | 1 | ||||
-rw-r--r-- | textproc/rtfreader/files/patch-rtfreader | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/textproc/rtfreader/Makefile b/textproc/rtfreader/Makefile index e31ed93916ef..40081a851b23 100644 --- a/textproc/rtfreader/Makefile +++ b/textproc/rtfreader/Makefile @@ -7,6 +7,7 @@ PORTNAME= rtfreader PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://www.fiction.net/blong/programs/ DISTNAME= ms-rtf diff --git a/textproc/rtfreader/files/patch-rtfreader b/textproc/rtfreader/files/patch-rtfreader new file mode 100644 index 000000000000..2390f5ef28ce --- /dev/null +++ b/textproc/rtfreader/files/patch-rtfreader @@ -0,0 +1,31 @@ +*** rtfreadr.c Thu Mar 6 00:06:26 1997 +--- rtfreadr.c.fixed Wed Mar 24 15:51:37 2004 +*************** +*** 107,119 **** + { + if (ch < 'a' || ch > 'f') + return ecInvalidHex; +! b += (char) ch - 'a'; + } + else + { + if (ch < 'A' || ch > 'F') + return ecInvalidHex; +! b += (char) ch - 'A'; + } + } + cNibble--; +--- 107,119 ---- + { + if (ch < 'a' || ch > 'f') + return ecInvalidHex; +! b += (char) ch - 'a'+10; + } + else + { + if (ch < 'A' || ch > 'F') + return ecInvalidHex; +! b += (char) ch - 'A'+10; + } + } + cNibble--; |