From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 3 15:20:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC46C106567C for ; Thu, 3 Apr 2008 15:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C4E678FC2D for ; Thu, 3 Apr 2008 15:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m33FK1sl009521 for ; Thu, 3 Apr 2008 15:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m33FK1uj009520; Thu, 3 Apr 2008 15:20:01 GMT (envelope-from gnats) Resent-Date: Thu, 3 Apr 2008 15:20:01 GMT Resent-Message-Id: <200804031520.m33FK1uj009520@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yarodin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D3F8106566B for ; Thu, 3 Apr 2008 15:17:32 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 176F18FC19 for ; Thu, 3 Apr 2008 15:17:32 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m33FHQE0043748 for ; Thu, 3 Apr 2008 15:17:26 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m33FHQVM043747; Thu, 3 Apr 2008 15:17:26 GMT (envelope-from nobody) Message-Id: <200804031517.m33FHQVM043747@www.freebsd.org> Date: Thu, 3 Apr 2008 15:17:26 GMT From: Yarodin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/122420: [UPDATE] Update archivers/unrar-iconv X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2008 15:20:02 -0000 >Number: 122420 >Category: ports >Synopsis: [UPDATE] Update archivers/unrar-iconv >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Apr 03 15:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Yarodin >Release: 6.3-RELEASE >Organization: >Environment: >Description: - Fix unicode support - Add some little notes. How to apply patch: 1) Put patch-unrar-iconv.txt to /usr/ports/archivers/ 2) cd /usr/ports/archivers/ && patch -p How-To-Repeat: >Fix: Patch attached with submission follows: --- unrar-iconv.orig/Makefile 2008-02-17 01:13:28.000000000 +0500 +++ unrar-iconv/Makefile 2008-04-03 20:59:33.000000000 +0600 @@ -18,5 +18,7 @@ post-install: @${ECHO_MSG} "===> Added iconv support, see new switches:" @${ECHO_MSG} " la, ll and lo at \"unrar -?\"" + @${ECHO_MSG} "===> REMEMBER!!!: Windows rar archives using old DOS encodings as internal encoding." + @${ECHO_MSG} " CP866 for russian lang for exmaple." .include "${MASTERDIR}/Makefile" --- unrar-iconv.orig/files/patch-iconv 2007-10-17 19:03:52.000000000 +0600 +++ unrar-iconv/files/patch-iconv 2008-04-03 21:15:46.000000000 +0600 @@ -152,10 +152,10 @@ #ifdef S_IFLNK #define SAVE_LINKS #endif ---- strfn.cpp Tue Oct 4 11:57:54 2005 -+++ strfn.cpp Mon Jan 16 18:04:41 2006 +--- strfn.cpp.orig 2007-09-10 17:49:28.000000000 +0600 ++++ strfn.cpp 2008-04-03 21:15:08.000000000 +0600 @@ -22,23 +22,49 @@ - + void ExtToInt(const char *Src,char *Dest) { +#ifdef WITH_ICONV @@ -163,23 +163,23 @@ + ret = (size_t)(-1); + if (h_E2I != (iconv_t)(-1)) { + static size_t inbytesleft, outbytesleft; -+ -+ inbytesleft = strlen(Src); -+ outbytesleft = inbytesleft; ++ inbytesleft = strlen(Src)+1; ++ outbytesleft = NM; + ret = iconv(h_E2I, &Src, &inbytesleft, &Dest, &outbytesleft); ++ Dest[outbytesleft-inbytesleft]=NULL; + } -+ if (ret == (size_t)(-1)) strcpy(Dest, Src); -+#else /* !WITH_ICONV */ ++ if (ret == (size_t)(-1)) strcpy(Dest, Src); ++#else /* !WITH_ICONV */ #if defined(_WIN_32) CharToOem(Src,Dest); #else if (Dest!=Src) strcpy(Dest,Src); #endif -+#endif /* !WITH_ICONV */ ++#endif /* !WITH_ICONV */ } - - + + void IntToExt(const char *Src,char *Dest) { +#ifdef WITH_ICONV @@ -187,18 +187,18 @@ + ret = (size_t)(-1); + if (h_I2E != (iconv_t)(-1)) { + static size_t inbytesleft, outbytesleft; -+ -+ inbytesleft = strlen(Src); -+ outbytesleft = inbytesleft; ++ inbytesleft = strlen(Src)+1; ++ outbytesleft = NM; + ret = iconv(h_I2E, &Src, &inbytesleft, &Dest, &outbytesleft); ++ Dest[outbytesleft-inbytesleft]=NULL; + } -+ if (ret == (size_t)(-1)) strcpy(Dest, Src); -+#else /* !WITH_ICONV */ ++ if (ret == (size_t)(-1)) strcpy(Dest,Src); ++#else /* !WITH_ICONV */ #if defined(_WIN_32) OemToChar(Src,Dest); #else if (Dest!=Src) strcpy(Dest,Src); #endif -+#endif /* !WITH_ICONV */ ++#endif /* !WITH_ICONV */ } >Release-Note: >Audit-Trail: >Unformatted: