summaryrefslogtreecommitdiffstats
path: root/util/ttyio.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-06-26 11:45:36 +0200
committerWerner Koch <wk@gnupg.org>1998-06-26 11:45:36 +0200
commit5911e300ff885ec570b59eaef7d8f19785e16fab (patch)
tree79888178beb6f742b784b5edc1da9cd154958e4a /util/ttyio.c
parent0.3 ready (diff)
downloadgnupg2-5911e300ff885ec570b59eaef7d8f19785e16fab.tar.xz
gnupg2-5911e300ff885ec570b59eaef7d8f19785e16fab.zip
bug fixes
Diffstat (limited to 'util/ttyio.c')
-rw-r--r--util/ttyio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/ttyio.c b/util/ttyio.c
index 415de65e4..bb795c282 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -230,6 +230,9 @@ do_get( const char *prompt, int hidden )
c = *cbuf;
if( c == '\t' )
c = ' ';
+ else if( c > 0xa0 )
+ ; /* we don't allow 0xa0, as this is a protected blank which may
+ * confuse the user */
else if( iscntrl(c) )
continue;
if( !(i < n-1) ) {
@@ -264,6 +267,9 @@ do_get( const char *prompt, int hidden )
c = *cbuf;
if( c == '\t' )
c = ' ';
+ else if( c > 0xa0 )
+ ; /* we don't allow 0xa0, as this is a protected blank which may
+ * confuse the user */
else if( iscntrl(c) )
continue;
if( !(i < n-1) ) {