Bug 37543 - libiconv run into endless loop during making security/gpgme.
Summary: libiconv run into endless loop during making security/gpgme.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-28 22:50 UTC by Fuyuhiko Maruyama
Modified: 2002-04-29 19:44 UTC (History)
0 users

See Also:


Attachments
file.diff (837 bytes, patch)
2002-04-28 22:50 UTC, Fuyuhiko Maruyama
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fuyuhiko Maruyama 2002-04-28 22:50:03 UTC
When libiconv fail text conversion, it may run into
endless loop (not always).

The problem is caused by libiconv's odd error handling. There 
is some program points where error code is silently changed,
RET_ILUNI to RET_TOOSMALL.  Since RET_TOOSMALL means no
sufficient buffer memory, libiconv try to enlarge buffer and
retry conversion.  Because of this nature, silently changed
error code causes endless loop of (enlarge buffer -> retry).

Fix: Although I met the problem when I make security/gpgme, the
actual problem is in converters/libiconv.

Here is a patch to fix libiconv.
I'm sorry to paste it from send-pr's web interface, I know
it breaks patch ;-<.
How-To-Repeat: 1. setenv LANG ja_JP.eucJP
2. cd /usr/ports/gpgme
3. make

It may be a locale dependent problem and I only know it
appears when I set LANG=ja_JP.eucJP.
Comment 1 Norikatsu Shigemura freebsd_committer 2002-04-29 16:19:17 UTC
State Changed
From-To: open->analyzed

over to gnome maintiner. 


Comment 2 Norikatsu Shigemura freebsd_committer 2002-04-29 16:19:17 UTC
Responsible Changed
From-To: freebsd-ports->gnome

over to gnome maintiner.
Comment 3 Norikatsu Shigemura freebsd_committer 2002-04-29 17:01:13 UTC
On Sun, 28 Apr 2002 14:40:20 -0700 (PDT)
Fuyuhiko Maruyama <fuyuhik8@is.titech.ac.jp> wrote:

> Here is a patch to fix libiconv.
> I'm sorry to paste it from send-pr's web interface, I know
> it breaks patch ;-<.

	I tested. This patch is OK.
Comment 4 Joe Marcus Clarke freebsd_committer 2002-04-29 19:44:13 UTC
State Changed
From-To: analyzed->closed

Committed, thanks!