lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] free() of idna_to_ascii_8z() buffer


From: Gisle Vanem
Subject: Re: [Lynx-dev] free() of idna_to_ascii_8z() buffer
Date: Sun, 9 Feb 2014 12:39:49 +0100

thanks - I've applied these fixes to my current code.

You should add this header too:

--- orig/WWW/Library/Implementation/HTParse.c     2013-11-29 01:52:56 +0000
+++ WWW/Library/Implementation/HTParse.c        2014-02-08 22:08:00 +0000
@@ -24,6 +24,7 @@

#ifdef USE_IDNA
#include <idna.h>
+#include <idn-free.h>
#endif

#define HEX_ESCAPE '%'
@@ -301,7 +302,7 @@
                       idna_strerror((Idna_rc) code)));
           }
           if (output)         /* "(free)" to bypass LYLeaks.c */
-               (free) (output);
+               idn_free (output);
       }
       free(buffer);
    }

---------

I think it's not needed to version-check for the <idn-free.h> header. It was
added in libidn's infancy; probably 4 years ago.

--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]