Bug 8763 - loadkeys dumps core with german keymaps in 6.1
loadkeys dumps core with german keymaps in 6.1
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: console-tools (Show other bugs)
6.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-23 05:07 EST by Toni Andjelkovic
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-05 13:43:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Toni Andjelkovic 2000-01-23 05:07:27 EST
this has been tested on i386 Redhat 6.1

the german keymaps in /usr/lib/kbd/keymaps/i386/qwertz
have include statements for files that don't exist, e.g.

include "qwertz-layout" in de.kmap.gz

when "loadkeys" reads the keymap from stdin, like in

$ zcat /usr/lib/kbd/keymaps/i386/qwertz/de.kmap.gz | ./loadkeys

it will dump core due to duplicating a NULL pointer
in find_standard_incl_file()

analyze.l:214
t = xstrdup(filename);

$ gdb loadkeys
[...]
(gdb) set args < de.kmap
(gdb) run
Starting program:
/usr/src/redhat/BUILD/console-tools-1999.03.02/kbdtools/loadkeys < de.kmap

Program received signal SIGSEGV, Segmentation fault.
0x4007568d in __strdup (s=0x0) at strdup.c:42
42      strdup.c: No such file or directory.

(gdb) info stack
#0  0x4007568d in __strdup (s=0x0) at strdup.c:42
#1  0x804f18c in xstrdup ()
#2  0x804d60c in find_standard_incl_file (s=0x80627b8 "qwertz-layout")
    at analyze.l:219
#3  0x804d83d in find_incl_file (s=0x80627b8 "qwertz-layout") at
analyze.l:276
#4  0x804d881 in open_include (s=0x80627b8 "qwertz-layout") at
analyze.l:286
#5  0x804c0fa in yylex () at analyze.l:73
#6  0x804944e in yyparse () at /usr/share/misc/bison.simple:387
#7  0x8049f58 in main (argc=1, argv=0xbffff964) at loadkeys.y:388


this bug is very annoying for german-speaking users.

a quick fix is to comment the include statements in
the german keymap-files, this bug happens only when
loadkeys has to read the map from stdin.

a quick and dirty fix:

--- analyze.l   Mon May 18 23:33:11 1998
+++ analyze.l.new       Sun Jan 23 11:10:37 2000
@@ -211,6 +211,9 @@
     return f;

   /* Try D and D/../include and D/../../include */
+    if(filename == NULL)
+      return (FILE *) 0;
+
   t = xstrdup(filename);
   te = rindex(t, '/');
   if (te)
Comment 1 Bill Nottingham 2000-02-05 13:43:59 EST
This works OK in the console-tools in Raw Hide.

Note You need to log in before you can comment on or make changes to this bug.