diff --git a/libchewing-0.3.0-3.bz199353.patch b/libchewing-0.3.0-3.bz199353.patch new file mode 100644 index 0000000..aacc955 --- /dev/null +++ b/libchewing-0.3.0-3.bz199353.patch @@ -0,0 +1,51 @@ +--- libchewing-0.3.0/src/hanyupinyin.c.1-bz199353 2006-05-15 16:49:43.000000000 +1000 ++++ libchewing-0.3.0/src/hanyupinyin.c 2006-09-05 10:47:46.000000000 +1000 +@@ -95,13 +95,15 @@ + * zuinKeySeq[] has at most 3 letters. + */ + keymap key, *res; +- strcpy( key.pinyin, pinyinKeySeq ); ++ strncpy( key.pinyin, pinyinKeySeq, 6 ); + + DEBUG_CHECKPOINT(); + res = bsearch( &key, keytable, N_TOTAL, sizeof(keymap), compkey ); +- if ( res != NULL ) ++ if ( res != NULL ){ + strcpy( zuinKeySeq, res->zuin ); ++ return 0; ++ } + else + zuinKeySeq = strdup( "" ); +- return 0; ++ return 1; + } +--- libchewing-0.3.0/src/zuin.c.1-bz199353 2006-05-15 16:49:43.000000000 +1000 ++++ libchewing-0.3.0/src/zuin.c 2006-09-05 10:47:46.000000000 +1000 +@@ -392,14 +392,16 @@ + static int PinYinInput( ZuinData *pZuin, int key ) + { + int err = 0, status, i; +- char zuinKeySeq[ 5 ], buf[ 2 ]; ++ char zuinKeySeq[ 5 ]; + + DEBUG_CHECKPOINT(); + + if ( IsPinYinEndKey( pZuin, key ) ) { + err = HanyuPinYinToZuin( pZuin->pinYinData.keySeq, zuinKeySeq ); +- if (err) +- return ZUIN_KEY_ERROR; ++ if (err){ ++ pZuin->pinYinData.keySeq[0] = '\0'; ++ return ZUIN_ABSORB; ++ } + + DEBUG_OUT( "zuinKeySeq: %s\n", zuinKeySeq ); + for ( i = 0; i < strlen( zuinKeySeq ); i++ ) { +@@ -420,6 +422,7 @@ + pZuin->pinYinData.keySeq[ 0 ] = '\0'; + return EndKeyProcess( pZuin, key, 1 ); + } ++ char buf[2]; + buf[ 0 ] = key; buf[ 1 ] = '\0'; + strcat( pZuin->pinYinData.keySeq, buf ); + diff --git a/libchewing.spec b/libchewing.spec index c76dd4f..67526e4 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -1,12 +1,13 @@ Name: libchewing Version: 0.3.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Group: System Environment/Libraries License: GPL URL: http://chewing.csie.net/ -Source: http://chewing.csie.net/download/libchewing/%{name}-%{version}.tar.gz +Source: http://chewing.csie.net/download/libchewing/%{name}-%{version}.tar.gz +Patch: libchewing-0.3.0-3.bz199353.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -27,6 +28,7 @@ Headers and other files needed to develop applications using the %name library. %prep %setup -q +%patch0 -p1 -b .1-bz199353 %build %configure --disable-static @@ -60,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Mon Sep 04 2006 Caius Chance - 0.3.0-3.fc6 +- Fixed bz#199353 - scim-chewing hangs for commit > 6 characters + * Wed Jul 19 2006 Jesse Keating - 0.3.0-2 - fix release