util/charset/convert: when retrying, retry from the start
commita6f47b4f7581e0a160fc844efc78e213c6546aee
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 10 May 2019 07:32:39 +0000 (10 19:32 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 May 2019 04:03:37 +0000 (15 04:03 +0000)
treeacaa871f9aa6b0e3ece929ee11a9e037a56a9ac1
parent02507ebf10eb6c038ef2ebc1e1aa6a4bd53eeecd
util/charset/convert: when retrying, retry from the start

iconv() advances the inbuf pointer; if we decide to realloc and re-iconv,
we need to reset inbuf to the source string

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/charset/convert_string.c