Your message dated Tue, 20 Jan 2009 15:02:19 +0000
with message-id <[email protected]>
and subject line Bug#498277: fixed in readline5 5.2-3.1
has caused the Debian Bug report #498277,
regarding readline: readline discards input data when run with rl_event_hook
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.)
--
498277: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498277
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libreadline5
Version: 5.2-3
Severity: important
File: readline
Tags: patch
Readline discards input data due to an off-by-one error on the ibuffer free
size calculation.
This buffer is only used when the program defines the rl_event_hook callback.
To reproduce, run the following code:
*** sample ***
#include <readline/readline.h>
#include <stdio.h>
int dummy(void) { return 0; }
int main(void)
{
char *str;
rl_event_hook = &dummy;
str = readline("> ");
printf("got '%s'\n", str);
return 0;
}
// try to run ruby -e 'puts "01"*513' | ./readtest
*** end of sample ***
this should display a 1026 character string, but the first 2*512 char are
discarded.
You can also generate the same string, fire irb (the interactive ruby shell),
and paste
it on the prompt: you'll notice that the characters at position 511 and 1022
have
disappeared.
The following patch fixes these issues.
*** patch ***
--- input.c.old 2008-09-08 18:12:04.000000000 +0200
+++ input.c 2008-09-08 18:13:27.000000000 +0200
@@ -134,7 +134,7 @@
*key = ibuffer[pop_index++];
- if (pop_index >= ibuffer_len)
+ if (pop_index > ibuffer_len)
pop_index = 0;
return (1);
@@ -373,7 +373,7 @@
RL_SETSTATE (RL_STATE_INPUTPENDING);
}
ibuffer[push_index++] = key;
- if (push_index >= ibuffer_len)
+ if (push_index > ibuffer_len)
push_index = 0;
return 1;
*** end of patch ***
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.21.1-grsec
Locale: LANG=C, LC_CTYPE=fr_FR (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to
C)
Shell: /bin/sh linked to /bin/bash
Versions of packages libreadline5 depends on:
ii libc6 2.7-13 GNU C Library: Shared libraries
ii libncurses5 5.6+20080906-1 shared libraries for terminal hand
ii readline-common 5.2-3 GNU readline and history libraries
libreadline5 recommends no packages.
libreadline5 suggests no packages.
-- no debconf information
--
Yoann Guillot
--- End Message ---
--- Begin Message ---
Source: readline5
Source-Version: 5.2-3.1
We believe that the bug you reported is fixed in the latest version of
readline5, which is due to be installed in the Debian FTP archive:
lib32readline5-dev_5.2-3.1_amd64.deb
to pool/main/r/readline5/lib32readline5-dev_5.2-3.1_amd64.deb
lib32readline5_5.2-3.1_amd64.deb
to pool/main/r/readline5/lib32readline5_5.2-3.1_amd64.deb
libreadline5-dbg_5.2-3.1_amd64.deb
to pool/main/r/readline5/libreadline5-dbg_5.2-3.1_amd64.deb
libreadline5-dev_5.2-3.1_amd64.deb
to pool/main/r/readline5/libreadline5-dev_5.2-3.1_amd64.deb
libreadline5_5.2-3.1_amd64.deb
to pool/main/r/readline5/libreadline5_5.2-3.1_amd64.deb
readline-common_5.2-3.1_all.deb
to pool/main/r/readline5/readline-common_5.2-3.1_all.deb
readline5_5.2-3.1.diff.gz
to pool/main/r/readline5/readline5_5.2-3.1.diff.gz
readline5_5.2-3.1.dsc
to pool/main/r/readline5/readline5_5.2-3.1.dsc
rlfe_5.2-3.1_amd64.deb
to pool/main/r/readline5/rlfe_5.2-3.1_amd64.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.
Arnaud Cornet <[email protected]> (supplier of updated readline5 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: Sat, 10 Jan 2009 17:06:46 +0100
Source: readline5
Binary: libreadline5 lib64readline5 readline-common libreadline5-dev
lib64readline5-dev libreadline5-dbg rlfe lib32readline5 lib32readline5-dev
Architecture: source all amd64
Version: 5.2-3.1
Distribution: unstable
Urgency: low
Maintainer: Matthias Klose <[email protected]>
Changed-By: Arnaud Cornet <[email protected]>
Description:
lib32readline5 - GNU readline and history libraries, run-time libraries
(32-bit)
lib32readline5-dev - GNU readline and history libraries, development files
(32-bit)
lib64readline5 - GNU readline and history libraries, run-time libraries
(64-bit)
lib64readline5-dev - GNU readline and history libraries, development files
(64-bit)
libreadline5 - GNU readline and history libraries, run-time libraries
libreadline5-dbg - GNU readline and history libraries, debugging libraries
libreadline5-dev - GNU readline and history libraries, development files
readline-common - GNU readline and history libraries, common files
rlfe - A front-end using readline to "cook" input lines for other progra
Closes: 498277
Changes:
readline5 (5.2-3.1) unstable; urgency=low
.
* Non-maintainer upload.
* Apply rl-input-eventhook.dpatch: Fix input data validation when run with
rl_event_hook. Closes: #498277.
Checksums-Sha1:
f342d37d935c508d1c8b59c16ac087a8ba34075e 1320 readline5_5.2-3.1.dsc
40a32b58984633f4fa74fd31cf1bd62f4dd5c0b5 20320 readline5_5.2-3.1.diff.gz
1bcfc0f2ce7c8274c186c095b4c94b231daf2214 50932 readline-common_5.2-3.1_all.deb
eb72528a9536137e4bc76467fa0e7f928f7d5ad9 146154 libreadline5_5.2-3.1_amd64.deb
9222e96afbf8fc7d221ef72c528a07eb0b424d89 242074
libreadline5-dev_5.2-3.1_amd64.deb
ac214c32a97de9cdbfe1fcfe94dc68bf3c881296 288074
libreadline5-dbg_5.2-3.1_amd64.deb
dbc40e57795fb207e7c74ddae1c56ccc2202bed7 17536 rlfe_5.2-3.1_amd64.deb
b97ed3a08166874fb43f835928070d44e600e545 130182
lib32readline5_5.2-3.1_amd64.deb
0219434bce0e430ba874cb46226a6242ac220d71 120570
lib32readline5-dev_5.2-3.1_amd64.deb
Checksums-Sha256:
0a90820973b03117a08b04a65e379be54a36636f8ad46378f2827a9c8c1c6cc4 1320
readline5_5.2-3.1.dsc
8b3cc0c58345d60cb46299abddb3b16b11c86a98c079fd4ba279b14f00677503 20320
readline5_5.2-3.1.diff.gz
64c0b8571df0e46d495c9ad50bed09e74d5ba03153ff08ce6ce2e39114b08dbb 50932
readline-common_5.2-3.1_all.deb
35a7de64f4c191054c79c56d94bb19a7b5d0b4a7b0070d968bfa611f6f56d331 146154
libreadline5_5.2-3.1_amd64.deb
ceeae82faa5c36392318211e92702a2e17a059a37ba74e4eb34dd72f92048d26 242074
libreadline5-dev_5.2-3.1_amd64.deb
2635dc084fc13da29a88c3fc39de8684ff99eefde32734f798ece4778c573d6d 288074
libreadline5-dbg_5.2-3.1_amd64.deb
7eac4d43830d9c329b7bf4989d53099d35b73a86022a5a4425047a2970ccf6a2 17536
rlfe_5.2-3.1_amd64.deb
ce1799880afc2998fd1fa018f9c8ba482fc1cb9c19535deb1f201ae02b999552 130182
lib32readline5_5.2-3.1_amd64.deb
148c232968e3f15a745fc1ec57d3dd65390a87010558028552ef7dcd4787c10c 120570
lib32readline5-dev_5.2-3.1_amd64.deb
Files:
e393d38af945bd201c65fef412031cdb 1320 libs important readline5_5.2-3.1.dsc
74a9c781e661e01a4995e9d6da239d00 20320 libs important readline5_5.2-3.1.diff.gz
f65741ea5eeccee567747fcc5ae99f5c 50932 utils standard
readline-common_5.2-3.1_all.deb
d06f83da109fd088821013dfabaf1b56 146154 libs important
libreadline5_5.2-3.1_amd64.deb
c9226e13c053b2bca31d0f630e89b348 242074 libdevel optional
libreadline5-dev_5.2-3.1_amd64.deb
4fcb181a5ee50cc50d9f69ea2665d81c 288074 libdevel extra
libreadline5-dbg_5.2-3.1_amd64.deb
2bc78e858869b7e684153984a164242f 17536 utils optional rlfe_5.2-3.1_amd64.deb
facf1a5eb66be38afd1980238bd8db54 130182 libs optional
lib32readline5_5.2-3.1_amd64.deb
18c44261cf8e8227bbea40770a4ac7b4 120570 libdevel optional
lib32readline5-dev_5.2-3.1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkltymQACgkQsk+dgCIlhI4unACffQz/iq94xlQtlHO8dDD+vg6X
C18An1QOqcHZGEtG4+XBptRJ3blF3ZS5
=R0yQ
-----END PGP SIGNATURE-----
--- End Message ---