git: 9front

Download patch

ref: c2497ff8757669e91fe2ed1e614194a8bee1c4f0
parent: 8f290c5481cfd7ab769bab7c5fc8047bc832d7d7
author: stanley lieber <stanley.lieber@gmail.com>
date: Tue Apr 8 21:57:03 EDT 2014

newt: improve input filtering

--- a/rc/bin/newt
+++ b/rc/bin/newt
@@ -154,8 +154,10 @@
 	cmd=`{read}
 	switch($cmd){
 	case [0-9]*
-		post=$cmd(1)
-		printp $post
+		if(grep -s -e '^[0-9]+$' <{echo $cmd(1)}){
+			post=$cmd(1)
+			printp $post
+		}
 	case b
 		if(! ~ $post $posts(1)){
 			post=`{echo $post^-1 | bc}
--