Skip to content

Commit b16271e

Browse files
committed
libvncclient: avoid ssize_t in ARD peek path
1 parent 9b16bd1 commit b16271e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libvncclient/ardauth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static rfbBool ConsumeRSASRPServerFinalIfPresent(rfbClient *client) {
152152
uint32_t n = 0;
153153
uint8_t *buf = NULL;
154154
int wm = WaitForMessage(client, 1500000);
155-
ssize_t r;
155+
int r;
156156

157157
if (wm < 0)
158158
return FALSE;
@@ -164,7 +164,7 @@ static rfbBool ConsumeRSASRPServerFinalIfPresent(rfbClient *client) {
164164
if (client->buffered > 0 || client->tlsSession || ARD_CLIENT_HAS_SASL_STATE(client))
165165
return TRUE;
166166
r = recv(client->sock, (char *)hdr, sizeof(hdr), MSG_PEEK);
167-
if (r < (ssize_t)sizeof(hdr))
167+
if (r < (int)sizeof(hdr))
168168
return TRUE;
169169
}
170170
n = ReadBEU32(hdr);

0 commit comments

Comments
 (0)