Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55082 - etc-update dies unexpectedly when user input is non-printable character(s)
Summary: etc-update dies unexpectedly when user input is non-printable character(s)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 61719 122716 (view as bug list)
Depends on: 93874
Blocks: 115839
  Show dependency tree
 
Reported: 2004-06-24 14:10 UTC by Elan Ruusamäe
Modified: 2006-04-17 01:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elan Ruusamäe 2004-06-24 14:10:05 UTC
etc-update asks for user input, how to proceed. if i (accidentally) press DELETE, or any non-letter button, it dies.
for example DELETE generates on my terminal '^[[3~'

# etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/init.d/syslog-ng
/etc/init.d/._cfg0000_syslog-ng
Please select a file to edit by entering the corresponding number.
              (-1 to exit) (-3 to auto merge all remaining files)
                           (-5 to auto-merge AND not use 'mv -i'): ^[[3~
/usr/sbin/etc-update: line 123: read: : syntax error: operand expected (error token is "")
Exiting: User termination!

perhaps it's just bash bug, but cannot reproduce it outside etc-update

# bash b.sh # hit DEL and ENTER
^[[3~
0
0000000 033   [   3   ~
        5b1b 7e33
0000004
# cat b.sh
#!/bin/sh
read input;echo $?;echo -n $input|od -cx


Reproducible: Always
Steps to Reproduce:
1. run etc-update
2. input \033 (escape button)
3. input ENTER
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-10-25 14:37:22 UTC
*** Bug 61719 has been marked as a duplicate of this bug. ***
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2006-04-13 10:40:18 UTC
the problem was that input was declared as an integer, so every time the user would enter a non-integer value, it would crash. fixed in rev 3140.
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2006-04-13 11:24:31 UTC
*** Bug 122716 has been marked as a duplicate of this bug. ***
Comment 4 Zac Medico gentoo-dev 2006-04-17 01:04:01 UTC
Released in 2.1_pre9.