Displaying 6 results from an estimated 6 matches for "tocode".
Did you mean:
ocode
2001 Sep 30
3
UTF-8 stuff
...char *from, char **to, const char *encoding)
+ if (!charset)
+ charset = getenv("CHARSET");
+
+ free(current_charset);
+ current_charset = 0;
+ if (charset && *charset)
+ current_charset = strdup(charset);
+}
+
+static int convert_buffer(const char *fromcode, const char *tocode,
+ const char *from, size_t fromlen,
+ char **to, size_t *tolen)
{
+ int ret = -1;
+
#ifdef HAVE_ICONV
- static unsigned char buffer[BUFSIZE];
- char *from_p, *to_p;
- size_t from_left, to_left;
- iconv_t cd;
+ ret = iconvert(fromcode, tocode, from, fromlen, to, tolen);
+ if (ret !=...
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
...ts_per_sample);
safe_decoder_finish_(decoder_);
return;
}
diff --git a/src/share/utf8/charset.c b/src/share/utf8/charset.c
index 432e32d..0c2d1ee 100644
--- a/src/share/utf8/charset.c
+++ b/src/share/utf8/charset.c
@@ -522,6 +522,7 @@ int charset_convert(const char *fromcode, const char *tocode,
if (to) {
newbuf = realloc(tobuf, p - tobuf);
*to = newbuf ? newbuf : tobuf;
+ free(newbuf);
}
else
free(tobuf);
diff --git a/src/test_libFLAC++/encoders.cpp b/src/test_libFLAC++/encoders.cpp
index 277e129..e328a53 100644
--- a/src/test_libFLAC++/encoders.cpp
+++ b/src/t...
2018 Jul 18
3
Behavior of safe_realloc_add_2op_()
I'm looking at an issue reported by the Coverity static analyzer.
In iconvert() in src/share/utf8/iconvert.c on line 152 there is
newbuf = safe_realloc_add_2op_(utfbuf, ...);
If the request size is not valid, the function will free utfbuf and
return 0. This is followed by goto fail and utfbuf is freed for the
second time. A simply fix would be to set utfbuf to 0 if newbuf is 0.
However, this
2005 Apr 18
0
3.0.14a: sig11/panic on redhat6x
...l.c:1445
#5 0x81aaf8b in fault_report (sig=11) at lib/fault.c:41
#6 0x81aaff4 in sig_fault (sig=11) at lib/fault.c:64
#7 0x40173c48 in __restore ()
at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127
#8 0x81cfa85 in lazy_initialize_iconv () at lib/iconv.c:125
#9 0x81cfc73 in smb_iconv_open (tocode=0x8275460 "UTF-16LE",
fromcode=0x827546e "ASCII") at lib/iconv.c:208
#10 0x81a7736 in init_iconv () at lib/charcnv.c:128
#11 0x807b8b7 in handle_charset ()
#12 0x807c411 in lp_do_parameter ()
#13 0x807c58c in do_parameter ()
#14 0x807e23c in Parameter ()
#15 0x807e2a0 in Par...
2007 Jul 14
2
PATCH : Fix missing protoypes
...iconv returns
+ * E2BIG (due to a bug in the specification of iconv).
+ * An alternative approach is to assume that the output of
+ * iconv is never more than 4 times as long as the input,
+ * but I prefer to avoid that assumption if possible.
+ */
+
+int iconvert(const char *fromcode, const char *tocode,
+ const char *from, size_t fromlen,
+ char **to, size_t *tolen) ;
+
+#endif /* HAVE_ICONV */
--- configure.in 2007-07-14 08:45:49 +0000
+++ configure.in 2007-07-15 01:45:52 +0000
@@ -280,7 +280,7 @@
else
OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -DNDEBUG"
if test "x$GCC"...
2008 Feb 26
4
rsync-3.0.0pre10 and iconv
Hello,
I am trying to get rsync-3.0.0pre10 --iconv option working between two linux hosts in local network.
The client host is running Fedora Core 4 (kernel 2.6.17) and is using iso8859-1 character set. LANG=en_US
The daemon host is running Centos 5 (kernel 2.6.18) and is using utf-8 character set. LANG=en_US.UTF-8
Rsync is transferring files properly without --iconv switch:
fc4: (connected