*scanf %a, patches...

Message ID 20121202200626.GA21883@triton8.kn-bremen.de
State New
Headers

Commit Message

Juergen Lock Dec. 2, 2012, 8:06 p.m. UTC
  On Sun, Dec 02, 2012 at 08:58:31PM +0100, Juergen Lock wrote:
> On Sun, Dec 02, 2012 at 02:19:44PM +0100, Klaus Schmidinger wrote:
> > On 01.12.2012 21:14, Juergen Lock wrote:
> > > In article <50BA09CC.2040104@flensrocker.de> you write:
> > >> Am 30.11.2012 11:32, schrieb Gerald Dachs:
> > >>> Am 2012-11-30 10:17, schrieb Lars Hanisch:

> [...]  And the tools.c patch for the
> cCharSetConv destructor looks like an actual bug, iconv_close()
> shouldn't be called with (iconv_t)-1.
> 
Ah sorry that patch isn't in ports yet, and now that I think of it
it only occured when testing the epgfixer plugin which doesn't quite
work properly yet anyway.  But I guess it wouldn't hurt applying
anyway so here it is:


 Thanx again, :)
	Juergen
  

Patch

--- tools.c.orig
+++ tools.c
@@ -842,7 +842,8 @@  cCharSetConv::cCharSetConv(const char *F
 cCharSetConv::~cCharSetConv()
 {
   free(result);
-  iconv_close(cd);
+  if (cd != (iconv_t)-1)
+     iconv_close(cd);
 }
 
 void cCharSetConv::SetSystemCharacterTable(const char *CharacterTable)