search for: eilseq

Displaying 20 results from an estimated 34 matches for "eilseq".

2013 Apr 16
7
[Bug 9798] New: rsync crash with SIGSEGV when read time out happens
..., f_in=5) at compat.c:150 #15 0x08060374 in client_run (f_in=5, f_out=4, pid=25865, argc=1, argv=0x80a21a4) at main.c:983 #16 0x0806097d in start_client (argc=1, argv=0x80a21a4) at main.c:1266 #17 0x08061033 in main (argc=2, argv=0x80a21a0) at main.c:1493 The most recent errno before the crash was EILSEQ. gdb)frame 4 gdb) p *in $49 = {buf = 0xbfffbcf0 "rsync error: error in rsync protocol data stream (code 12) at io.c(635) [receiver=3.0.2]\n", pos = 16342, len = 4294951042, size = 4294967295} (gdb) p icnt $50 = 4294951042 --? This doesn?t look a good number. It is causing out of buffer...
2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
...(ret == NULL) - return NULL; - memcpy (ret, vk->name, len); - ret[len] = '\0'; + char *ret; + if (le16toh(vk->flags) & 0x01) { + ret = windows_latin1_to_utf8(vk->name, len); + } else { + ret = windows_utf16_to_utf8(vk->name, len); + } + if (!ret) + errno = EILSEQ; return ret; } @@ -1250,58 +1248,70 @@ hivex_value_value (hive_h *h, hive_value_h value, } static char * -windows_utf16_to_utf8 (/* const */ char *input, size_t len) +iconv_wrapper (iconv_t ic, char *input, size_t len) { - iconv_t ic = iconv_open ("UTF-8", "UTF-16");...
2011 Feb 26
3
hivex: some issues (key encoding, ...) and suggested fixes
...o: /* Deal with the case where Windows has allocated a large buffer * full of random junk, and only the first few bytes of the buffer * contain a genuine UTF-16 string. * * In this case, iconv would try to process the junk bytes as UTF-16 * and inevitably find an illegal sequence (EILSEQ). Instead, stop * after we find the first \0\0. * * (Found by Hilko Bengen in a fresh Windows XP SOFTWARE hive). */ size_t slen = utf16_string_len_in_bytes_max (data, len); if (slen > len) len = slen; char *ret = windows_utf16_to_utf8 (data, len); slen is only used to in...
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
...lloc; - /* Try again with a larger output buffer. */ - free (out); - outalloc *= 2; - if (outalloc < prev) { - iconv_close (ic); - errno = err; - return NULL; - } - goto again; - } - else { - /* Else some other conversion failure, eg. EILSEQ, EINVAL. */ - err = errno; - iconv_close (ic); - free (out); - errno = err; - return NULL; - } - } - - *outp = '\0'; - iconv_close (ic); - - return out; -} diff --git a/common/utils/utils.c b/common/utils/utils.c index 22af62b0f..faef7c089 100644 --- a/common...
2008 Jul 01
1
Autoconf / Windows package building problem for device package
...cast devPS.c:872: warning: implicit declaration of function 'Riconv' devPS.c:874: warning: implicit declaration of function 'Riconv_close' devPS.c: In function 'mbcsToSbcs': devPS.c:4020: warning: assignment makes pointer from integer without a cast devPS.c:4029: error: 'EILSEQ' undeclared (first use in this function) devPS.c: In function 'PDF_NewPage': devPS.c:6406: warning: unused variable 'i' devPS.c: In function 'PDF_StrSize': devPS.c:7129: warning: unused variable 'face' devPS.c:7128: warning: unused variable 'pd' devPS.c:...
2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...t; sizeof(u->u.buffer)) return -EINVAL; @@ -169,6 +223,56 @@ static ssize_t xenbus_dev_write(struct f kfree(reply); break; + case XS_WATCH: + case XS_UNWATCH: + path = u->u.buffer + sizeof(u->u.msg); + token = memchr(path, 0, u->u.msg.len); + if (token == NULL) + return -EILSEQ; + token++; + + if (msg_type == XS_WATCH) { + static const char * XS_WATCH_RESP = "OK"; + struct xsd_sockmsg hdr; + + watch = kmalloc(sizeof(*watch), GFP_KERNEL); + watch->watch.node = kmalloc(strlen(path)+1, + GFP_KERNEL); +...
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2: * inlined local_string_to_utf8 Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 11 +++++ common/utils/libxml2-utils.c | 69 +-------------------------- common/utils/utils.c | 64 +++++++++++++++++++++++++
2002 Feb 08
1
RC3: oggenc & iconv
...ng on the locale settings. (On FreeBSD, with Chuguev iconv.) I think I'm getting a handle on the assert(). It's this one: assertion "(!k && !ibl) || (k == (size_t)(-1) && errno == E2BIG && ibl && obl < 6) || (k == (size_t)(-1) && (errno == EILSEQ || errno == EINVAL) && ibl)" failed: file "iconvert.c", line 111 In my test case, we have a plain ASCII string with a KOI8-R locale charset and this: Before the first iconv() call: * ibl = 9 * obl = utflen = 1 After the iconv() call: * k = 0, ibl = 8, obl = 0, errno = EINVA...
2012 Jan 24
0
[PATCH] linux-2.6.18/xenbus_dev: add missing error checks to watch handling
...ned-off-by: Jan Beulich <jbeulich@suse.com> --- a/drivers/xen/xenbus/xenbus_dev.c +++ b/drivers/xen/xenbus/xenbus_dev.c @@ -269,18 +269,24 @@ static ssize_t xenbus_dev_write(struct f goto out; } token++; + if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) { + rc = -EILSEQ; + goto out; + } if (msg_type == XS_WATCH) { watch = kzalloc(sizeof(*watch), GFP_KERNEL); - watch->watch.node = kmalloc(strlen(path)+1, - GFP_KERNEL); - strcpy((char *)watch->watch.node, path); + if (watch == NULL) { + rc...
2012 Jan 24
0
[PATCH] xenbus_dev: add missing error check to watch handling
...+) --- 3.3-rc1/drivers/xen/xenbus/xenbus_dev_frontend.c +++ 3.3-rc1-xenbus-dev-write-watch/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -369,6 +369,10 @@ static int xenbus_write_watch(unsigned m goto out; } token++; + if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) { + rc = -EILSEQ; + goto out; + } if (msg_type == XS_WATCH) { watch = alloc_watch_adapter(path, token);
2015 May 15
2
charset_to_utf8 assertion of remaining src_size
...HA512 Hi, I have seen the following assertion fails on my own mail server (indexer-worker): Panic: file charset-iconv.c: line 132 (charset_to_utf8): assertion failed: (*src_size - pos <= CHARSET_MAX_PENDING_BUF_SIZE) However, when charset_to_utf8_try returns FALSE (e.g. iconv() got EINVAL or EILSEQ), the for loop in charset_to_utf8 may end earlier, and there may be additional pending characters, and the assertion doesn't seem always hold in the error case, perhaps we should assert that pos is non-zero in the error case? Cheers, - -- Xin LI <delphij at delphij.net> https://www.d...
2015 Jul 10
2
Ovislink
On 10/07/15 04:26, Charles Lepple wrote: > On Jul 9, 2015, at 9:43 AM, paul at paulcarmichael.org wrote: > >> Is there currently a way of implementing NUT with an Ovislink Chrome 1500 UPS? > > Not sure. There was a thread in February talking about an Ovislink Chrome 1000, but I don't think we ever resolved what was causing the "Device busy" error: > >
2018 Feb 15
3
[PATCH v2 0/2] inspect: basic UTF-8 encoding for rpm
This needs Richard's patch: https://www.redhat.com/archives/libguestfs/2018-February/msg00099.html Diff to v1: * factorized the UTF-8 conversion functions * small style fixes Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 1 + common/utils/libxml2-utils.c
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...alloc < prev) { - iconv_close (ic); + _hivex_release_iconv (h, t); errno = err; return NULL; } @@ -75,19 +71,17 @@ _hivex_recode (const char *input_encoding, const char *input, size_t input_len, } else { /* Else some conversion failure, eg. EILSEQ, EINVAL. */ - int err = errno; - iconv_close (ic); + _hivex_release_iconv (h, t); free (out); errno = err; return NULL; } } + _hivex_release_iconv (h, t); *outp = '\0'; - iconv_close (ic); if (output_len != NULL) *output_len = outp...
2001 Sep 30
3
UTF-8 stuff
...if(iconv(cd, (ICONV_CONST char **)(&from_p), &from_left, &to_p, - &to_left) == (size_t)-1) - { - iconv_close(cd); - switch(errno) - { - case E2BIG: - /* if the buffer is too small, try simple_utf8_encode() - */ - return simple_utf8_encode(from, to, encoding); - case EILSEQ: - case EINVAL: - return 3; - default: - perror("iconv"); - } - } - else - { - iconv_close(cd); - } - *to = malloc(BUFSIZE - to_left + 1); - buffer[BUFSIZE - to_left] = 0; - strcpy(*to, buffer); - return 0; -#else - return simple_utf8_encode(from, to, encoding); +#ifndef HAVE_ICON...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...(ic); > + _hivex_release_iconv (h, t); > errno = err; > return NULL; > } > @@ -75,19 +71,17 @@ _hivex_recode (const char *input_encoding, const char *input, size_t input_len, > } > else { > /* Else some conversion failure, eg. EILSEQ, EINVAL. */ > - int err = errno; > - iconv_close (ic); > + _hivex_release_iconv (h, t); > free (out); > errno = err; > return NULL; > } > } > > + _hivex_release_iconv (h, t); > *outp = '\0'; > - iconv_clo...
2011 Sep 17
0
[LLVMdev] Build errors on r139985
...m/include/llvm/Support/system_error.h:526: error: ‘EHOSTUNREACH’ was not declared in this scope /home/carl/Downloads/llvm3.0/llvm/include/llvm/Support/system_error.h:527: error: ‘EIDRM’ was not declared in this scope /home/carl/Downloads/llvm3.0/llvm/include/llvm/Support/system_error.h:528: error: ‘EILSEQ’ was not declared in this scope /home/carl/Downloads/llvm3.0/llvm/include/llvm/Support/system_error.h:529: error: ‘ENOTTY’ was not declared in this scope /home/carl/Downloads/llvm3.0/llvm/include/llvm/Support/system_error.h:530: error: ‘EINTR’ was not declared in this scope /home/carl/Downloads/llv...
2018 Feb 15
0
[PATCH] Introduce a wrapper around xmlParseURI.
...lloc; + /* Try again with a larger output buffer. */ + free (out); + outalloc *= 2; + if (outalloc < prev) { + iconv_close (ic); + errno = err; + return NULL; + } + goto again; + } + else { + /* Else some other conversion failure, eg. EILSEQ, EINVAL. */ + err = errno; + iconv_close (ic); + free (out); + errno = err; + return NULL; + } + } + + *outp = '\0'; + iconv_close (ic); + + return out; +} diff --git a/common/utils/libxml2-utils.h b/common/utils/libxml2-utils.h new file mode 100644 index 000...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...alloc < prev) { - iconv_close (ic); + _hivex_release_iconv (h, t); errno = err; return NULL; } @@ -75,19 +71,17 @@ _hivex_recode (const char *input_encoding, const char *input, size_t input_len, } else { /* Else some conversion failure, eg. EILSEQ, EINVAL. */ - int err = errno; - iconv_close (ic); + _hivex_release_iconv (h, t); free (out); errno = err; return NULL; } } + _hivex_release_iconv (h, t); *outp = '\0'; - iconv_close (ic); if (output_len != NULL) *output_len = outp...
2018 Nov 02
0
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
...lloc; + /* Try again with a larger output buffer. */ + free (out); + outalloc *= 2; + if (outalloc < prev) { + iconv_close (ic); + errno = err; + return NULL; + } + goto again; + } + else { + /* Else some other conversion failure, eg. EILSEQ, EINVAL. */ + err = errno; + iconv_close (ic); + free (out); + errno = err; + return NULL; + } + } + + *outp = '\0'; + iconv_close (ic); + + return out; +} diff --git a/common/utils/libxml2-utils.h b/common/utils/libxml2-utils.h new file mode 100644 index 000...