[freenos] r358 committed - Fixed Terminal crash: initialized the cursorPos variable to zero....

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Sat, 05 Sep 2009 17:50:53 +0000

Revision: 358
Author: nieklinnenbank
Date: Sat Sep  5 10:49:52 2009
Log: Fixed Terminal crash: initialized the cursorPos variable to zero.
Due to this bug, cursorPos was used with uninitialized random data,
resulting in a possibly erroneous memory write reference. The result
was that FreeNOS couldn't boot successfully on bare hardware. This patch
solves that issue.

http://code.google.com/p/freenos/source/detail?r=358

Modified:
 /trunk/srv/terminal/Terminal.cpp

=======================================
--- /trunk/srv/terminal/Terminal.cpp    Sun Aug  2 04:54:52 2009
+++ /trunk/srv/terminal/Terminal.cpp    Sat Sep  5 10:49:52 2009
@@ -77,6 +77,9 @@
     funcs.tf_param   = (tf_param_t *)   param;
     funcs.tf_respond = (tf_respond_t *) respond;

+    /* Reset cursor. */
+    memset(&cursorPos, 0, sizeof(cursorPos));
+
     /* Initialize libteken. */
     teken_init(&state, &funcs, this);


Other related posts:

  • » [freenos] r358 committed - Fixed Terminal crash: initialized the cursorPos variable to zero.... - codesite-noreply