Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cast incoming characters to unsigned char to avoid accidental sign

extension. Since ldisc_send() uses bit 8 as an internal flag, we
shouldn't be setting it except when we really want to.


git-svn-id: svn://svn.tartarus.org/sgt/putty@8989 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information...
commit b96c714ea3802c22f3fe2659c121fd79ce28cbf2 1 parent 854caca
simon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ldisc.c
View
2  ldisc.c
@@ -147,7 +147,7 @@ void ldisc_send(void *handle, char *buf, int len, int interactive)
if (EDITING) {
while (len--) {
int c;
- c = *buf++ + keyflag;
+ c = (unsigned char)(*buf++) + keyflag;
if (!interactive && c == '\r')
c += KCTRL('@');
switch (ldisc->quotenext ? ' ' : c) {
Please sign in to comment.
Something went wrong with that request. Please try again.