Your message dated Sun, 15 Aug 2010 03:17:06 +0000
with message-id <[email protected]>
and subject line Bug#593006: fixed in eblook 1:1.6.1-8
has caused the Debian Bug report #593006,
regarding eblook: codeconv problems
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
593006: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593006
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: eblook
Version: 1:1.6.1-7
Severity: important
Tags: upstream patch

In eblook 1.6.1, curret_to_euc() is called with
current_to_euc(&ibuf,&ilen,&str,(size_t *)&size), but the size
argument is defined as int, that is problematic on an environment
if size_t differs from int.  Also, a buffer handling mismatch and a
initialization problem exist.

In the upstream list [edict 2711], on 2010-08-15, the patch to fix
this bug is provided by Kazuhiro Ito.

Thanks,
--
Tatsuya Kinoshita
diff -u ../eblook-1.6.1.orig/codeconv.c ../eblook-1.6.1/codeconv.c
--- ../eblook-1.6.1.orig/codeconv.c	2003-03-08 23:29:47.000000000 +0900
+++ ../eblook-1.6.1/codeconv.c	2010-08-15 08:33:21.218750000 +0900
@@ -564,7 +564,7 @@
 char *
 xfgets(str, size, fp)
      char *str;
-     int size;
+     size_t size;
      FILE *fp;
 {
     char *ibuf, *ibuf0;
@@ -595,7 +595,7 @@
     ibuf[ilen]=0;
     ilen=strlen(ibuf);

-    status = current_to_euc(&ibuf,&ilen,&str,(size_t *)&size);
+    status = current_to_euc(&ibuf,&ilen,&str,&size);
     str0[size0-size]=0;
 #ifndef HAVE_ALLOCA
     free(ibuf0);
@@ -652,7 +652,6 @@
      char **in_buf, **out_buf;
      size_t *in_len,*out_len;
 {
-    static int output_left = -1;
     int c1, c2;
     size_t count = 0;

@@ -661,6 +660,7 @@
         size_t ret;
         if (cur_to_euc == (iconv_t) -1)
 	    return CODECONV_ERROR;
+        iconv(cur_to_euc,NULL,NULL,NULL,NULL);
         ret = iconv(cur_to_euc,in_buf,in_len,out_buf,out_len);
 	if (ret != ((size_t)-1))
 	    ret = iconv(cur_to_euc, NULL, in_len, out_buf, out_len);
@@ -675,17 +675,6 @@
     }
 #endif /* HAVE_ICONV */

-    if (output_left >= 0) {
-        if (*out_len > 0) {
-	    *((*in_buf)++) = output_left;
-	    (*out_len)--;
-	    count++;
-	    output_left = -1;
-	} else {
-  	    /* Output Buffer Overflow */
-	    return CODECONV_BUFFER_OVERFLOW;
-	}
-    }
     if (conv_mode == IO_SJIS) {
         while(*in_len>0) {
 	    if (*out_len<=0) break;
@@ -724,10 +713,8 @@
 	    *((*out_buf)++) = c1 | 0x80;
 	    (*out_len)--;
 	    count++;
-	    if (*out_len <= 0) {
-	        output_left = c2;
+	    if (*out_len <= 0)
 		return CODECONV_BUFFER_OVERFLOW;
-	    }
 	    *((*out_buf)++) = c2;
 	    (*out_len)--;
 	    count++;
@@ -761,7 +748,6 @@
      char **in_buf, **out_buf;
      size_t *in_len,*out_len;
 {
-    static int output_left = -1;
     int c1, c2;
     size_t count = 0;

@@ -770,6 +756,7 @@
         size_t ret;
         if (euc_to_cur == (iconv_t) -1)
 	    return CODECONV_ERROR;
+        iconv(euc_to_cur,NULL,NULL,NULL,NULL);
         ret = iconv(euc_to_cur,in_buf,in_len,out_buf,out_len);
         if (ret != ((size_t)-1))
 	    ret = iconv(euc_to_cur,NULL,in_len,out_buf,out_len);
@@ -784,17 +771,6 @@
     }
 #endif /* HAVE_ICONV */

-    if (output_left >= 0) {
-        if (*out_len > 0) {
-	    *((*in_buf)++) = output_left;
-	    (*out_len)--;
-	    count++;
-	    output_left = -1;
-	} else {
-  	    /* Output Buffer Overflow */
-	    return CODECONV_BUFFER_OVERFLOW;
-	}
-    }
     if (conv_mode == IO_SJIS) {
         while(*in_len>0) {
 	    if (*out_len<=0) break;
@@ -829,10 +805,8 @@
 	    *((*out_buf)++) = c1;
 	    (*out_len)--;
 	    count++;
-	    if (*out_len <= 0) {
-	        output_left = c2;
+	    if (*out_len <= 0)
 		return CODECONV_BUFFER_OVERFLOW;
-	    }
 	    *((*out_buf)++) = c2;
 	    (*out_len)--;
 	    count++;
diff -u ../eblook-1.6.1.orig/codeconv.h ../eblook-1.6.1/codeconv.h
--- ../eblook-1.6.1.orig/codeconv.h	2003-03-08 23:29:47.000000000 +0900
+++ ../eblook-1.6.1/codeconv.h	2010-08-14 18:44:09.390625000 +0900
@@ -50,7 +50,7 @@
 extern int xprintf PROTO((const char *fmt, ...));
 extern int xfputs PROTO((const char *str, FILE *fp));
 extern int xputs PROTO((const char *str));
-extern char *xfgets PROTO((char *str, int size, FILE *fp));
+extern char *xfgets PROTO((char *str, size_t size, FILE *fp));

 extern char *euc_to_jis PROTO((char *jis, const char *euc, int len));
 extern char *jis_to_euc PROTO((char *euc, const char *jis, int len));
diff -u ../eblook-1.6.1.orig/eblook.c ../eblook-1.6.1/eblook.c
--- ../eblook-1.6.1.orig/eblook.c	2004-06-18 01:09:01.000000000 +0900
+++ ../eblook-1.6.1/eblook.c	2010-08-14 18:50:40.406250000 +0900
@@ -133,7 +133,7 @@
 int pclose_pager (FILE *);
 #endif

-char *read_command (char *, int, FILE *);
+char *read_command (char *, size_t, FILE *);
 int excute_command (char *);
 int parse_command_line (char *, char *[]);
 #ifdef USE_READLINE
@@ -650,7 +650,7 @@
 char *
 read_command (command_line, size, stream)
      char *command_line;
-     int size;
+     size_t size;
      FILE *stream;
 {
   char *p;

Attachment: pgpvxQIqXQ1J8.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: eblook
Source-Version: 1:1.6.1-8

We believe that the bug you reported is fixed in the latest version of
eblook, which is due to be installed in the Debian FTP archive:

eblook_1.6.1-8.debian.tar.gz
  to main/e/eblook/eblook_1.6.1-8.debian.tar.gz
eblook_1.6.1-8.dsc
  to main/e/eblook/eblook_1.6.1-8.dsc
eblook_1.6.1-8_i386.deb
  to main/e/eblook/eblook_1.6.1-8_i386.deb



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.
Tatsuya Kinoshita <[email protected]> (supplier of updated eblook 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.8
Date: Sun, 15 Aug 2010 11:35:58 +0900
Source: eblook
Binary: eblook
Architecture: source i386
Version: 1:1.6.1-8
Distribution: unstable
Urgency: medium
Maintainer: Tatsuya Kinoshita <[email protected]>
Changed-By: Tatsuya Kinoshita <[email protected]>
Description: 
 eblook     - electronic dictionary search command using EB Library
Closes: 593006
Changes: 
 eblook (1:1.6.1-8) unstable; urgency=medium
 .
   * debian/patches/30_codeconv-size.patch: Patch to fix codeconv problems
     (size_t vs int, etc.), from the upstream mailing list [edict 2711], on
     2010-08-15, provided by Kazuhiro Ito. (closes: #593006)
Checksums-Sha1: 
 3edc4e609dcfa86b5caf8902ee52f79668c51880 1044 eblook_1.6.1-8.dsc
 437298162e61773827b6caa9cad22d359670dbf5 24374 eblook_1.6.1-8.debian.tar.gz
 d22fc5c9a2f76cba355d2ed5feff043a4bc16078 47008 eblook_1.6.1-8_i386.deb
Checksums-Sha256: 
 f2cdbb578fd282fa7c8fae3f1a0edb45a71e5eb7e02eda74375c9ed4ea3eb589 1044 
eblook_1.6.1-8.dsc
 85cf379c8d891344582d73781ac8d514d3c69e0fefd06b7ccafcbf6942d23848 24374 
eblook_1.6.1-8.debian.tar.gz
 791359d8f0ee0791cea49adf5c9913a296a54f095f190893587d5915468ab68d 47008 
eblook_1.6.1-8_i386.deb
Files: 
 dea5496d5253d1a192778de00b8b7e4a 1044 text optional eblook_1.6.1-8.dsc
 965683436a8f9394cc370e5f8b31d524 24374 text optional 
eblook_1.6.1-8.debian.tar.gz
 a29ee2ec4dc2a555c42a4f1e91984c17 47008 text optional eblook_1.6.1-8_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkxnV+kACgkQgV4LPvpMUpg1TACfePaV+EmxjEd8JA9nb+DMQ8g+
maoAoMKelreG6bVONEzdJ/V/hm6LwI/c
=YsPl
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to