projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve scheduling on the Mac:
[u/mdw/putty]
/
ssh.c
diff --git
a/ssh.c
b/ssh.c
index
76dc2ec
..
5bea36b
100644
(file)
--- a/
ssh.c
+++ b/
ssh.c
@@
-1167,8
+1167,18
@@
static void s_wrpkt_start(Ssh ssh, int type, int len)
static int s_wrpkt_prepare(Ssh ssh)
{
static int s_wrpkt_prepare(Ssh ssh)
{
- int pad,
len,
biglen, i;
+ int pad, biglen, i;
unsigned long crc;
unsigned long crc;
+#ifdef __SC__
+ /*
+ * XXX various versions of SC (including 8.8.4) screw up the
+ * register allocation in this function and use the same register
+ * (D6) for len and as a temporary, with predictable results. The
+ * following sledgehammer prevents this.
+ */
+ volatile
+#endif
+ int len;
ssh->pktout.body[-1] = ssh->pktout.type;
ssh->pktout.body[-1] = ssh->pktout.type;
@@
-2193,7
+2203,13
@@
static int process_userpass_input(Ssh ssh, unsigned char *in, int inlen)
return -1;
break;
default:
return -1;
break;
default:
- if (((c >= ' ' && c <= '~') ||
+ /*
+ * This simplistic check for printability is disabled
+ * when we're doing password input, because some people
+ * have control characters in their passwords.o
+ */
+ if ((!ssh->userpass_input_echo ||
+ (c >= ' ' && c <= '~') ||
((unsigned char) c >= 160))
&& ssh->userpass_input_bufpos < ssh->userpass_input_buflen-1) {
ssh->userpass_input_buffer[ssh->userpass_input_bufpos++] = c;
((unsigned char) c >= 160))
&& ssh->userpass_input_bufpos < ssh->userpass_input_buflen-1) {
ssh->userpass_input_buffer[ssh->userpass_input_bufpos++] = c;