a bug in kdb_parse()

Tachino Nobuhiro tachino at open.nm.fujitsu.co.jp
Sun Sep 30 21:52:10 PDT 2001


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)



More information about the kdb mailing list