kdb
[Top] [All Lists]

a bug in kdb_parse()

To: kdb@xxxxxxxxxxx
Subject: a bug in kdb_parse()
From: Tachino Nobuhiro <tachino@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Oct 2001 13:52:10 +0900
Sender: owner-kdb@xxxxxxxxxxx
User-agent: Wanderlust/2.7.4 (Too Funky) EMY/1.13.9 (Art is long, life is short) SLIM/1.14.7 () APEL/10.3 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i586-kondara-linux)
Hello,

I found a bug in kdb_parse() in v1.9 which causes system hang or reboot
when subcommand like "set LINES=50" is entered.

Following patch fixes the problem.


diff -r -u -N linux-2.4.10.org/kdb/kdbmain.c linux-2.4.10/kdb/kdbmain.c
--- linux-2.4.10.org/kdb/kdbmain.c      Mon Oct  1 11:28:42 2001
+++ linux-2.4.10/kdb/kdbmain.c  Mon Oct  1 13:31:18 2001
@@ -605,6 +605,8 @@
                        while (*cp && !isspace(*cp) && (*cp != '='))
                                *cpp++ = *cp++;
                        *cpp++ = '\0';  /* Squash a ws or '=' character */
+                       if (!*cp++)
+                               break;
                }
        }
        if (!argc)

<Prev in Thread] Current Thread [Next in Thread>