Your message dated Thu, 20 Jul 2006 01:17:17 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#375790: fixed in uni2ascii 3.9.5-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: uni2ascii
Version: 3.9-1
Severity: normal
Tags: patch
uni2ascii fails if a read returns a partial result in the middle of a
multi-byte UTF-8 sequence. This only happens if the UTF-8 sequence is
at least 3 bytes long, because of the detailed logic. Here's a test
case:
------------------------------------------------------------
[EMAIL PROTECTED]:~$ (echo -ne '\344\270'; echo -e '\200') | uni2ascii
0x4E00
1 tokens converted out of 2 characters
[EMAIL PROTECTED]:~$ (echo -ne '\344\270'; sleep 2; echo -e '\200') | uni2ascii
Truncated UTF-8 sequence encountered at byte 0, character 0.
------------------------------------------------------------
The byte sequence '\342\270\200' is a single UTF-8 sequence. In the
first command, with no pause, the read returns the expected result.
In the second command we insert a pause between the 2nd and 3rd bytes,
with a resulting spurious error message.
(The bug was found by Chung-Chieh Shan, cc:ed.)
Patch attached. I note that the file patched, Get_UTF32_From_UTF8.c,
is written by Bill Poser, who is not listed as the author of
uni2ascii; perhaps this file came from some other package, and the
patch should be passed upstream?
Peace,
Dylan Thurston
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.1
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages uni2ascii depends on:
ii libc6 2.3.6-15 GNU C Library: Shared libraries
uni2ascii recommends no packages.
-- no debconf information
--- uni2ascii-3.9/Get_UTF32_From_UTF8.c 2006-05-11 21:20:37.000000000 -0400
+++ uni2ascii-3.9.new/Get_UTF32_From_UTF8.c 2006-06-28 00:44:18.000000000 -0400
@@ -86,6 +86,7 @@
UTF32 Get_UTF32_From_UTF8 (int fd, int *bytes, unsigned char **bstr)
{
+ int BytesSoFar;
int BytesRead;
int BytesNeeded; /* Additional bytes after initial byte */
static unsigned char c[6];
@@ -102,9 +103,13 @@
/* Now get the remaining bytes */
BytesNeeded = (int) TrailingBytesForUTF8[c[0]];
- BytesRead = read(fd,(void *) &c[1],(size_t) BytesNeeded);
- if(BytesRead != BytesNeeded) return(UTF8_NOTENOUGHBYTES);
- *bytes = BytesRead+1;
+ BytesSoFar = 0;
+ do {
+ BytesRead = read(fd,(void *) &c[BytesSoFar+1],(size_t) (BytesNeeded-BytesSoFar));
+ BytesSoFar += BytesRead;
+ } while (BytesRead > 0 || BytesSoFar < BytesNeeded);
+ if(BytesSoFar != BytesNeeded) return(UTF8_NOTENOUGHBYTES);
+ *bytes = BytesNeeded+1;
*bstr = &c[0];
/* Check validity of source */
--- End Message ---
--- Begin Message ---
Source: uni2ascii
Source-Version: 3.9.5-1
We believe that the bug you reported is fixed in the latest version of
uni2ascii, which is due to be installed in the Debian FTP archive:
uni2ascii_3.9.5-1.diff.gz
to pool/main/u/uni2ascii/uni2ascii_3.9.5-1.diff.gz
uni2ascii_3.9.5-1.dsc
to pool/main/u/uni2ascii/uni2ascii_3.9.5-1.dsc
uni2ascii_3.9.5-1_i386.deb
to pool/main/u/uni2ascii/uni2ascii_3.9.5-1_i386.deb
uni2ascii_3.9.5.orig.tar.gz
to pool/main/u/uni2ascii/uni2ascii_3.9.5.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jose Carlos Medeiros <[EMAIL PROTECTED]> (supplier of updated uni2ascii package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 6 Jul 2006 20:38:07 -0300
Source: uni2ascii
Binary: uni2ascii
Architecture: source i386
Version: 3.9.5-1
Distribution: unstable
Urgency: low
Maintainer: Jose Carlos Medeiros <[EMAIL PROTECTED]>
Changed-By: Jose Carlos Medeiros <[EMAIL PROTECTED]>
Description:
uni2ascii - convert UTF-8 into 7-bit ASCII and vice versa
Closes: 367546 375790
Changes:
uni2ascii (3.9.5-1) unstable; urgency=low
.
* New upstream release. (Closes: #375790, #367546)
* Standards-Version: 3.7.2
Files:
1c05236f16b0bbef0f986bbfa8ad4f64 633 text optional uni2ascii_3.9.5-1.dsc
b8d25cdb3b39055c11ea506dc9614351 122081 text optional
uni2ascii_3.9.5.orig.tar.gz
221a7d3589c88220829f410148dde64f 20516 text optional uni2ascii_3.9.5-1.diff.gz
740d4da108730ef57b85f3599305bf6c 37638 text optional uni2ascii_3.9.5-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEvzbCGKGxzw/lPdkRAlwlAJ92fB0tSUCEQRDeikWPT6t+if1IrwCgjVPt
Lwl1EkH3QlYR4+C+mQpK/w0=
=4+gZ
-----END PGP SIGNATURE-----
--- End Message ---