]> andersk Git - openssh.git/commitdiff
- deraadt@cvs.openbsd.org 2006/03/20 18:14:02
authordjm <djm>
Sun, 26 Mar 2006 03:04:36 +0000 (03:04 +0000)
committerdjm <djm>
Sun, 26 Mar 2006 03:04:36 +0000 (03:04 +0000)
     [channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c]
     [ssh.c sshpty.c sshpty.h]
     sprinkle u_int throughout pty subsystem, ok markus

ChangeLog
channels.c
clientloop.c
monitor_wrap.c
serverloop.c
ssh.c
sshpty.c

index d3c962b47f563a0999f55ee2086f513d3d9b2da8..30a1430d40b193a42862481070edfa8696221c77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,9 @@
    - deraadt@cvs.openbsd.org 2006/03/20 17:17:23
      [ssh-rsa.c]
      in a switch (), break after return or goto is stupid
+   - deraadt@cvs.openbsd.org 2006/03/20 18:14:02
+     [channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c ssh.c sshpty.c sshpty.h]
+     sprinkle u_int throughout pty subsystem, ok markus
 
 20060325
  - OpenBSD CVS Sync
index ce868dc4e7fe1dd3d9f7854c7347c544407e30f0..6cb88ad44f6ceaa4794a9d553b8667cad65ae4a5 100644 (file)
@@ -2737,10 +2737,10 @@ channel_send_window_changes(void)
                if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0)
                        continue;
                channel_request_start(i, "window-change", 0);
-               packet_put_int(ws.ws_col);
-               packet_put_int(ws.ws_row);
-               packet_put_int(ws.ws_xpixel);
-               packet_put_int(ws.ws_ypixel);
+               packet_put_int((u_int)ws.ws_col);
+               packet_put_int((u_int)ws.ws_row);
+               packet_put_int((u_int)ws.ws_xpixel);
+               packet_put_int((u_int)ws.ws_ypixel);
                packet_send();
        }
 }
index d321cb8bf2d67d262ece86049405c436abf7fe23..36a4a64ae495102eed1185fa134f3fdfb7f66f8b 100644 (file)
@@ -434,10 +434,10 @@ client_check_window_change(void)
                if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
                        return;
                packet_start(SSH_CMSG_WINDOW_SIZE);
-               packet_put_int(ws.ws_row);
-               packet_put_int(ws.ws_col);
-               packet_put_int(ws.ws_xpixel);
-               packet_put_int(ws.ws_ypixel);
+               packet_put_int((u_int)ws.ws_row);
+               packet_put_int((u_int)ws.ws_col);
+               packet_put_int((u_int)ws.ws_xpixel);
+               packet_put_int((u_int)ws.ws_ypixel);
                packet_send();
        }
 }
@@ -1881,10 +1881,10 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
 
                channel_request_start(id, "pty-req", 0);
                packet_put_cstring(term != NULL ? term : "");
-               packet_put_int(ws.ws_col);
-               packet_put_int(ws.ws_row);
-               packet_put_int(ws.ws_xpixel);
-               packet_put_int(ws.ws_ypixel);
+               packet_put_int((u_int)ws.ws_col);
+               packet_put_int((u_int)ws.ws_row);
+               packet_put_int((u_int)ws.ws_xpixel);
+               packet_put_int((u_int)ws.ws_ypixel);
                tio = get_saved_tio();
                tty_make_modes(-1, tiop != NULL ? tiop : &tio);
                packet_send();
index 7536bf305da6f1f8cd03dd999afe57732dbcc215..e5a65491d0e490d378cad968705ae1db6d1e5282 100644 (file)
@@ -636,7 +636,7 @@ mm_send_keystate(struct monitor *monitor)
 }
 
 int
-mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
+mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
 {
        Buffer m;
        char *p, *msg;
index 816215e05bfcda57612290aaabd7cc2846d2326c..3bc0c5a765558461a213a38b2943cca0d7ef8822 100644 (file)
@@ -880,10 +880,10 @@ server_input_eof(int type, u_int32_t seq, void *ctxt)
 static void
 server_input_window_size(int type, u_int32_t seq, void *ctxt)
 {
-       int row = packet_get_int();
-       int col = packet_get_int();
-       int xpixel = packet_get_int();
-       int ypixel = packet_get_int();
+       u_int row = packet_get_int();
+       u_int col = packet_get_int();
+       u_int xpixel = packet_get_int();
+       u_int ypixel = packet_get_int();
 
        debug("Window change received.");
        packet_check_eom();
diff --git a/ssh.c b/ssh.c
index 3615d1c403d3d5ced1f9738c80a505439d88179c..550218444c448ebc3dc79cfc3cfa3e889d146565 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -889,10 +889,10 @@ ssh_session(void)
                /* Store window size in the packet. */
                if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
                        memset(&ws, 0, sizeof(ws));
-               packet_put_int(ws.ws_row);
-               packet_put_int(ws.ws_col);
-               packet_put_int(ws.ws_xpixel);
-               packet_put_int(ws.ws_ypixel);
+               packet_put_int((u_int)ws.ws_row);
+               packet_put_int((u_int)ws.ws_col);
+               packet_put_int((u_int)ws.ws_xpixel);
+               packet_put_int((u_int)ws.ws_ypixel);
 
                /* Store tty modes in the packet. */
                tty_make_modes(fileno(stdin), NULL);
index 2e42aee1157cabef6958a6c2106d3b54b4b46b64..9ac4903efa533bb7b9083392ea9ddd7b2516f4d8 100644 (file)
--- a/sshpty.c
+++ b/sshpty.c
@@ -46,7 +46,7 @@
  */
 
 int
-pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
+pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
 {
        /* openpty(3) exists in OSF/1 and some other os'es */
        char *name;
@@ -169,11 +169,12 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
 /* Changes the window size associated with the pty. */
 
 void
-pty_change_window_size(int ptyfd, int row, int col,
-       int xpixel, int ypixel)
+pty_change_window_size(int ptyfd, u_int row, u_int col,
+       u_int xpixel, u_int ypixel)
 {
        struct winsize w;
 
+       /* may truncate u_int -> u_short */
        w.ws_row = row;
        w.ws_col = col;
        w.ws_xpixel = xpixel;
This page took 2.253206 seconds and 5 git commands to generate.