From 69f7355be49d98bcfbb1856cdd2ac8a3f601ae60 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 18 Aug 2008 04:22:31 +0000 Subject: * transcode.c (transcode_search_path): prevent infinite loop by searching a path for self conversion. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- transcode.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'transcode.c') diff --git a/transcode.c b/transcode.c index 32e3d082a..33b1c7fc9 100644 --- a/transcode.c +++ b/transcode.c @@ -165,6 +165,9 @@ transcode_search_path(const char *from, const char *to, int found; int pathlen; + if (encoding_equal(from, to)) + return -1; + q = ALLOC(search_path_queue_t); q->enc = from; q->next = NULL; -- cgit