rpms/hunspell/F-9 hunspell-1.2.1-1863239.badstructs.patch, 1.3, 1.4 hunspell-1.2.1-badsizeof.patch, NONE, 1.1 hunspell-pkgconfig.patch, 1.2, 1.3 hunspell.spec, 1.38, 1.39

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Mon May 26 19:38:49 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/hunspell/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5294

Modified Files:
	hunspell.spec 
Added Files:
	hunspell-1.2.1-1863239.badstructs.patch 
	hunspell-1.2.1-badsizeof.patch hunspell-pkgconfig.patch 
Log Message:
Resolves: rhbz#448413 bad sizeof calculation

hunspell-1.2.1-1863239.badstructs.patch:

Index: hunspell-1.2.1-1863239.badstructs.patch
===================================================================
RCS file: hunspell-1.2.1-1863239.badstructs.patch
diff -N hunspell-1.2.1-1863239.badstructs.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ hunspell-1.2.1-1863239.badstructs.patch	26 May 2008 19:38:06 -0000	1.4
@@ -0,0 +1,173 @@
+diff -ru hunspell-1.2.1.orig/src/hunspell/csutil.cxx hunspell-1.2.1/src/hunspell/csutil.cxx
+--- hunspell-1.2.1.orig/src/hunspell/csutil.cxx	2007-11-01 15:40:53.000000000 +0000
++++ hunspell-1.2.1/src/hunspell/csutil.cxx	2008-01-03 16:02:31.000000000 +0000
+@@ -941,7 +941,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ 
+@@ -1201,7 +1201,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ 
+@@ -1461,7 +1461,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso4_tbl[] = {
+@@ -1720,7 +1720,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso5_tbl[] = {
+@@ -1979,7 +1979,7 @@
+ { 0x00, 0xfc, 0xac },
+ { 0x00, 0xfd, 0xfd },
+ { 0x00, 0xfe, 0xae },
+-{ 0x00, 0xff, 0xaf },
++{ 0x00, 0xff, 0xaf }
+ };
+ 
+ struct cs_info iso6_tbl[] = {
+@@ -2238,7 +2238,7 @@
+ { 0x00, 0xfc, 0xfc },
+ { 0x00, 0xfd, 0xfd },
+ { 0x00, 0xfe, 0xfe },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso7_tbl[] = {
+@@ -2497,7 +2497,7 @@
+ { 0x00, 0xfc, 0xbc },
+ { 0x00, 0xfd, 0xbe },
+ { 0x00, 0xfe, 0xbf },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso8_tbl[] = {
+@@ -2756,7 +2756,7 @@
+ { 0x00, 0xfc, 0xfc },
+ { 0x00, 0xfd, 0xfd },
+ { 0x00, 0xfe, 0xfe },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso9_tbl[] = {
+@@ -3015,7 +3015,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0x49 },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso10_tbl[] = {
+@@ -3274,7 +3274,7 @@
+ { 0x00, 0xfc, 0xfc },
+ { 0x00, 0xfd, 0xfd },
+ { 0x00, 0xfe, 0xfe },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info koi8r_tbl[] = {
+@@ -3533,7 +3533,7 @@
+ { 0x01, 0xdc, 0xfc },
+ { 0x01, 0xdd, 0xfd },
+ { 0x01, 0xde, 0xfe },
+-{ 0x01, 0xdf, 0xff },
++{ 0x01, 0xdf, 0xff }
+ };
+ 
+ struct cs_info koi8u_tbl[] = {
+@@ -3792,7 +3792,7 @@
+ { 0x01, 0xdc, 0xfc },
+ { 0x01, 0xdd, 0xfd },
+ { 0x01, 0xde, 0xfe },
+-{ 0x01, 0xdf, 0xff },
++{ 0x01, 0xdf, 0xff }
+ };
+ 
+ struct cs_info cp1251_tbl[] = {
+@@ -4051,7 +4051,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xdf },
++{ 0x00, 0xff, 0xdf }
+ };
+ 
+ struct cs_info iso13_tbl[] = {
+@@ -4310,7 +4310,7 @@
+ { 0x00, 0xFC, 0xDC },
+ { 0x00, 0xFD, 0xDD },
+ { 0x00, 0xFE, 0xDE },
+-{ 0x00, 0xFF, 0xFF },
++{ 0x00, 0xFF, 0xFF }
+ };
+ 
+ 
+@@ -4570,7 +4570,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct cs_info iso15_tbl[] = {
+@@ -4829,7 +4829,7 @@
+ { 0x00, 0xfc, 0xdc },
+ { 0x00, 0xfd, 0xdd },
+ { 0x00, 0xfe, 0xde },
+-{ 0x00, 0xff, 0xbe },
++{ 0x00, 0xff, 0xbe }
+ };
+ 
+ struct cs_info iscii_devanagari_tbl[] = {
+@@ -5088,7 +5088,7 @@
+ { 0x00, 0xfc, 0xfc },
+ { 0x00, 0xfd, 0xfd },
+ { 0x00, 0xfe, 0xfe },
+-{ 0x00, 0xff, 0xff },
++{ 0x00, 0xff, 0xff }
+ };
+ 
+ struct enc_entry encds[] = {
+@@ -5108,7 +5108,7 @@
+ {"ISO8859-13", iso13_tbl},
+ {"ISO8859-14", iso14_tbl},
+ {"ISO8859-15", iso15_tbl},
+-{"ISCII-DEVANAGARI", iscii_devanagari_tbl},
++{"ISCII-DEVANAGARI", iscii_devanagari_tbl}
+ };
+ 
+ struct cs_info * get_current_cs(const char * es) {
+@@ -5117,6 +5117,7 @@
+   for (int i = 0; i < n; i++) {
+     if (strcmp(es,encds[i].enc_name) == 0) {
+       ccs = encds[i].cs_table;
++      break;
+     }
+   }
+   return ccs;

hunspell-1.2.1-badsizeof.patch:

--- NEW FILE hunspell-1.2.1-badsizeof.patch ---
diff -ru hunspell-1.2.1.orig/src/parsers/htmlparser.cxx hunspell-1.2.1/src/parsers/htmlparser.cxx
--- hunspell-1.2.1.orig/src/parsers/htmlparser.cxx	2008-05-26 20:33:37.000000000 +0100
+++ hunspell-1.2.1/src/parsers/htmlparser.cxx	2008-05-26 20:34:29.000000000 +0100
@@ -28,7 +28,7 @@
 	{ "<", ">" }
 };
 
-#define PATTERN_LEN (sizeof(PATTERN) / (sizeof(char *) * 2))
+#define PATTERN_LEN (sizeof(PATTERN) / sizeof(PATTERN[0]))
 
 static char * PATTERN2[][2] = {
 	{ "<img", "alt=" }, // ALT and TITLE attrib handled spec.
@@ -36,7 +36,7 @@
 	{ "<a ", "title=" }
 };
 
-#define PATTERN_LEN2 (sizeof(PATTERN2) / (sizeof(char *) * 2))
+#define PATTERN_LEN2 (sizeof(PATTERN2) / sizeof(PATTERN2[0]))
 
 HTMLParser::HTMLParser(const char * wordchars)
 {
diff -ru hunspell-1.2.1.orig/src/parsers/latexparser.cxx hunspell-1.2.1/src/parsers/latexparser.cxx
--- hunspell-1.2.1.orig/src/parsers/latexparser.cxx	2008-05-26 20:33:37.000000000 +0100
+++ hunspell-1.2.1/src/parsers/latexparser.cxx	2008-05-26 20:34:41.000000000 +0100
@@ -82,7 +82,7 @@
 	{ { "\\url", NULL } , 1 }
 };
 
-#define PATTERN_LEN (sizeof(PATTERN) / ((sizeof(char *) * 2) + sizeof(int)))
+#define PATTERN_LEN (sizeof(PATTERN) / sizeof(PATTERN[0]))
 
 LaTeXParser::LaTeXParser(const char * wordchars)
 {
diff -ru hunspell-1.2.1.orig/src/parsers/textparser.cxx hunspell-1.2.1/src/parsers/textparser.cxx
--- hunspell-1.2.1.orig/src/parsers/textparser.cxx	2008-05-26 20:33:37.000000000 +0100
+++ hunspell-1.2.1/src/parsers/textparser.cxx	2008-05-26 20:35:08.000000000 +0100
@@ -44,7 +44,7 @@
 	"ÿ"
 };
 
-#define LATIN1_LEN (sizeof(LATIN1) / sizeof(char *))
+#define LATIN1_LEN (sizeof(LATIN1) / sizeof(LATIN[0]))
 
 TextParser::TextParser() {
 	init((char *) NULL);

hunspell-pkgconfig.patch:

Index: hunspell-pkgconfig.patch
===================================================================
RCS file: hunspell-pkgconfig.patch
diff -N hunspell-pkgconfig.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ hunspell-pkgconfig.patch	26 May 2008 19:38:06 -0000	1.3
@@ -0,0 +1,9 @@
+--- hunspell-1.2.1.orig/hunspell.pc.in	2007-04-06 09:05:34.000000000 +0100
++++ hunspell-1.2.1/hunspell.pc.in	2007-11-09 14:21:26.000000000 +0000
+@@ -6,5 +6,5 @@
+ Name: hunspell
+ Description: Hunpell spellchecking library
+ Version: @VERSION@
+-Libs: -L${libdir} -lhunspell- at HUNSPELL_VERSION_MAJOR@. at HUNSPELL_VERSION_MINOR@
++Libs: -L${libdir} -lhunspell
+ Cflags: -I${includedir}/hunspell


Index: hunspell.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hunspell/F-9/hunspell.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- hunspell.spec	18 Apr 2008 12:58:39 -0000	1.38
+++ hunspell.spec	26 May 2008 19:38:06 -0000	1.39
@@ -1,7 +1,7 @@
 Name:      hunspell
 Summary:   Hunspell is a spell checker and morphological analyzer library
 Version:   1.2.1
-Release:   6%{?dist}
+Release:   7%{?dist}
 Source0:   http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz
 Source1:   http://people.debian.org/~agmartin/misc/ispellaff2myspell
 Group:     System Environment/Libraries
@@ -12,6 +12,7 @@
 
 Patch1: hunspell-pkgconfig.patch
 Patch2: hunspell-1.2.1-1863239.badstructs.patch
+Patch3: hunspell-1.2.1-badsizeof.patch
 
 %description
 Hunspell is a spell checker and morphological analyzer library and program 
@@ -31,6 +32,7 @@
 %setup -q
 %patch1 -p1 -b .pkgconfig.patch
 %patch2 -p1 -b .1863239.badstructs.patch
+%patch3 -p1 -b .badsizeof.patch
 # Filter unwanted Requires for the use explicitely string in ispellaff2myspell
 cat << \EOF > %{name}-req
 #!/bin/sh
@@ -94,6 +96,9 @@
 %{_libdir}/pkgconfig/hunspell.pc
 
 %changelog
+* Mon May 26 2008 Caolan McNamara <caolanm at redhat.com> - 1.2.1-7
+- Resolves: rhbz#448413 bad sizeof calculation
+
 * Wed Mar 05 2008 Caolan McNamara <caolanm at redhat.com> - 1.2.1-6
 - add ispellaff2myspell to devel
 




More information about the fedora-extras-commits mailing list