summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2014-04-17 14:11:28 +0200
committerAxel Beckert <abe@deuxchevaux.org>2014-04-17 14:11:28 +0200
commitc3927cc39106d6b7cd746109784b6e8af203ec6b (patch)
treec7e4f517ca9a07c0cd8c809da7af0251e8cec6a7 /process.c
parent28a2487f484d19f570280f391f606aeb7fb3fb4a (diff)
downloadscreen-c3927cc39106d6b7cd746109784b6e8af203ec6b.tar.gz
Imported Upstream version 4.2.0upstream/4.2.0
Diffstat (limited to 'process.c')
-rw-r--r--process.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/process.c b/process.c
index d86c62c..30497a3 100644
--- a/process.c
+++ b/process.c
@@ -6360,6 +6360,12 @@ char *data;
buf = crypt(u->u_password, salt);
bzero(u->u_password, strlen(u->u_password));
free((char *)u->u_password);
+ if (!buf)
+ {
+ Msg(0, "[ crypt() error - no secure ]");
+ u->u_password = NullStr;
+ return;
+ }
u->u_password = SaveStr(buf);
bzero(buf, strlen(buf));
#ifdef COPY_PASTE
@@ -6472,6 +6478,7 @@ int i;
{
struct action *act;
int discard = 0;
+ int keyno = i;
debug1("StuffKey #%d", i);
#ifdef DEBUG
@@ -6511,6 +6518,9 @@ int i;
if (discard && (!act || act->nr != RC_COMMAND))
{
+ /* if the input was just a single byte we let it through */
+ if (D_tcs[keyno + T_CAPS].str && strlen(D_tcs[keyno + T_CAPS].str) == 1)
+ return -1;
if (D_ESCseen)
{
D_ESCseen = 0;