From e2e9d36206f53432d978b7e529998947c9a44ad1 Mon Sep 17 00:00:00 2001 From: Ivana Varekova Date: May 29 2008 11:19:36 +0000 Subject: fix previous patch --- diff --git a/aspell-0.60.5-zero.patch b/aspell-0.60.5-zero.patch index 475fea5..4fd9307 100644 --- a/aspell-0.60.5-zero.patch +++ b/aspell-0.60.5-zero.patch @@ -1,11 +1,11 @@ -diff -up aspell-0.60.5/common/convert.cpp.pom aspell-0.60.5/common/convert.cpp ---- aspell-0.60.5/common/convert.cpp.pom 2006-11-18 09:36:01.000000000 +0100 -+++ aspell-0.60.5/common/convert.cpp 2008-05-29 11:25:25.000000000 +0200 -@@ -821,6 +821,7 @@ namespace acommon { - PosibErr decode_ec(const char * in, int size, - FilterCharVector & out, ParmStr orig) const { - const char * begin = in; -+ if (size == 0) return; // if size == 0 then while loop cause SIGSEGV +diff -up aspell-0.60.5/common/convert.cpp.zero aspell-0.60.5/common/convert.cpp +--- aspell-0.60.5/common/convert.cpp.zero 2006-11-18 09:36:01.000000000 +0100 ++++ aspell-0.60.5/common/convert.cpp 2008-05-29 13:13:03.000000000 +0200 +@@ -813,6 +813,7 @@ namespace acommon { + { + ToUniLookup lookup; + void decode(const char * in, int size, FilterCharVector & out) const { ++ if (size == 0) return; // if size == 0 then while loop cause SIGSEGV const char * stop = in + size; // this is OK even if size == -1 while (*in && in != stop) { - FilterChar c = from_utf8(in, stop, (Uni32)-1); + out.append(from_utf8(in, stop));