LibVNCServer: fix heap out-of-bound write access

Closes #243
pull/3/head
Christian Beier 6 years ago
parent 7b1ef0ffc4
commit 502821828e
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -1465,7 +1465,7 @@ char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length)
rfbLog("rfbProcessFileTransferReadBuffer(%dlen)\n", length);
*/
if (length>0) {
buffer=malloc(length+1);
buffer=malloc((uint64_t)length+1);
if (buffer!=NULL) {
if ((n = rfbReadExact(cl, (char *)buffer, length)) <= 0) {
if (n != 0)

Loading…
Cancel
Save