Mercurial > dropbear
comparison svr-x11fwd.c @ 1237:888e3d17e962
Fix print format specifier
author | Chocobo1 <Chocobo1@users.noreply.github.com> |
---|---|
date | Tue, 05 Jan 2016 12:32:33 +0800 |
parents | aaf576b27a10 |
children | 428d83f2e5db |
comparison
equal
deleted
inserted
replaced
1236:a0062a354a80 | 1237:888e3d17e962 |
---|---|
140 if (chansess->x11listener == NULL) { | 140 if (chansess->x11listener == NULL) { |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 /* create the DISPLAY string */ | 144 /* create the DISPLAY string */ |
145 val = snprintf(display, sizeof(display), "localhost:%d.%d", | 145 val = snprintf(display, sizeof(display), "localhost:%d.%u", |
146 chansess->x11port - X11BASEPORT, chansess->x11screennum); | 146 chansess->x11port - X11BASEPORT, chansess->x11screennum); |
147 if (val < 0 || val >= (int)sizeof(display)) { | 147 if (val < 0 || val >= (int)sizeof(display)) { |
148 /* string was truncated */ | 148 /* string was truncated */ |
149 return; | 149 return; |
150 } | 150 } |
151 | 151 |
152 addnewvar("DISPLAY", display); | 152 addnewvar("DISPLAY", display); |
153 | 153 |
154 /* create the xauth string */ | 154 /* create the xauth string */ |
155 val = snprintf(display, sizeof(display), "unix:%d.%d", | 155 val = snprintf(display, sizeof(display), "unix:%d.%u", |
156 chansess->x11port - X11BASEPORT, chansess->x11screennum); | 156 chansess->x11port - X11BASEPORT, chansess->x11screennum); |
157 if (val < 0 || val >= (int)sizeof(display)) { | 157 if (val < 0 || val >= (int)sizeof(display)) { |
158 /* string was truncated */ | 158 /* string was truncated */ |
159 return; | 159 return; |
160 } | 160 } |