Commit 81289eb6 authored by Christian Beier's avatar Christian Beier

Properly check return value.

This also fixes a compiler warning.
parent cdf8a18c
......@@ -1721,7 +1721,10 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con
#ifdef LIBVNCSERVER_HAVE_LIBZ
/* compressed packet */
nRet = uncompress(compBuff,&nRawBytes,(const unsigned char*)buffer, length);
if(nRet == Z_OK)
retval=write(cl->fileTransfer.fd, (char*)compBuff, nRawBytes);
else
retval = -1;
#else
/* Write the file out as received... */
retval=write(cl->fileTransfer.fd, buffer, length);
......
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