Mercurial > dropbear
diff svr-x11fwd.c @ 1247:428d83f2e5db
merge github master
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 10 Mar 2016 21:37:35 +0800 |
parents | a3e8389e01ff 888e3d17e962 |
children | 3a383aaeb487 |
line wrap: on
line diff
--- a/svr-x11fwd.c Thu Mar 10 21:35:23 2016 +0800 +++ b/svr-x11fwd.c Thu Mar 10 21:37:35 2016 +0800 @@ -165,7 +165,7 @@ } /* create the DISPLAY string */ - val = snprintf(display, sizeof(display), "localhost:%d.%d", + val = snprintf(display, sizeof(display), "localhost:%d.%u", chansess->x11port - X11BASEPORT, chansess->x11screennum); if (val < 0 || val >= (int)sizeof(display)) { /* string was truncated */ @@ -175,7 +175,7 @@ addnewvar("DISPLAY", display); /* create the xauth string */ - val = snprintf(display, sizeof(display), "unix:%d.%d", + val = snprintf(display, sizeof(display), "unix:%d.%u", chansess->x11port - X11BASEPORT, chansess->x11screennum); if (val < 0 || val >= (int)sizeof(display)) { /* string was truncated */