r18376: added iconv:native=false option to turn off native iconv. Needed under
authorAndrew Tridgell <tridge@samba.org>
Mon, 11 Sep 2006 09:19:58 +0000 (09:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:21 +0000 (14:18 -0500)
valgrind as native iconv is so full of overflows
(This used to be commit d1de0202efc6e6ca4bbc1997f3e493da18cd35f4)

source4/lib/charset/iconv.c

index d3aff7b24fd52ecc3dca7c6cc29161544e4af746..8a7f4b4f6b08e1cdea377959d03e3dae7b13f9ee 100644 (file)
@@ -200,6 +200,9 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
        }
 
 #ifdef HAVE_NATIVE_ICONV
+       if ((!from || !to) && !lp_parm_bool(-1, "iconv", "native", True)) {
+               goto failed;
+       }
        if (!from) {
                ret->pull = sys_iconv;
                ret->cd_pull = iconv_open("UTF-16LE", fromcode);