Commit c656b381 authored by Peter Arrenbrecht's avatar Peter Arrenbrecht Committed by Johannes Schindelin

Fix tightvnc-filetransfer 64 bit buffer overflow

Seems there is a buffer overflow in x11vnc's tightvnc-filetransfer
code when compiling to 64 bits: a buffer is allocated using sizeof(int)
for the size, but then, data is copied into it using
sizeof(unsigned long).

Detected by GCC build with full warnings.
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 6b2b3b82
......@@ -393,7 +393,7 @@ FileTransferMsg
CreateFileDownloadZeroSizeDataMsg(unsigned long mTime)
{
FileTransferMsg fileDownloadZeroSizeDataMsg;
int length = sz_rfbFileDownloadDataMsg + sizeof(int);
int length = sz_rfbFileDownloadDataMsg + sizeof(unsigned long);
rfbFileDownloadDataMsg *pFDD = NULL;
char *pFollow = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment