Commit Graph

1321 Commits (5d3e41d2573c7fd7ee35d4f402d46b9311e72321)
 

Author SHA1 Message Date
Daniel Cohen Gindi fbf48c65f3 `strings.h` and `resolv.h` are not available on MSVC, and some POSIX functions are renamed or deprecated
For all of those missing/deprecated POSIX functions, we just add a macro mapping to the _underscored version of MSVC.
11 years ago
Christian Beier fdf5f8876f The HAVE_X11 define is not there anymore, but we don't need it either. 11 years ago
Christian Beier d999a8eae3 Move vncterm to https://github.com/LibVNC/vncterm. 11 years ago
Christian Beier 7960c6871d Move VisualNaCro to https://github.com/LibVNC/VisualNaCro. 11 years ago
Christian Beier 9bf5fe0160 Move prepare_x11vnc_dist.sh over to x11vnc repo. 11 years ago
Christian Beier 0f25ea7324 Remove x11vnc from autotools build system. 11 years ago
Christian Beier 7dfd4f3b04 Remove tightvnc-1.3dev5-vncviewer-alpha-cursor.patch. 11 years ago
Christian Beier 498d222976 Remove x11vnc subdir.
The new x11vnc repo is at https://github.com/LibVNC/x11vnc.
11 years ago
Johannes Schindelin 8d2db0486d Fix tv_usec calculation
This bug was introduced in the MSVC patches.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 70783a4d60 Merge branch 'msvc'
This topic branch provides compatibility for Windows, without the
MINGW32 dependency.

It is based on https://github.com/LibVNC/libvncserver/pull/22.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 54b2400dd7 Use Windows' critical sections to emulate pthread's mutexes
With Microsoft Visual C++, we cannot use pthreads (MinGW sports an
emulation library which is the reason we did not need Windows-specific
hacks earlier). Happily, it is very easy to provide Windows-specific
emulations for the pthread calls we use.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi dfdb11144a Perform pointer arithmetic on char * instead of void *
Microsoft Visual C++ does not allow pointer arithmetic on void pointers.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi e26aeb4062 MSVC: Use the Unix emulation headers
[JES: provided commit message, split out unrelated changes]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 366dda9951 Use WIN32 for Windows-specific #ifdef guards
To support Microsoft Visual C++, we must not guard Windows-specific code
in MinGW-specific #ifdef guards.

Happily, even 64-bit MSVC defines the WIN32 constant, therefore we can use
that instead.

[JES: fixed commit message, reordered commit, split out unrelated changes]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 4c2cfb17f0 Add MSVC compatible unix headers
The stdint.h file was copied from:

	https://runexe.googlecode.com/svn-history/r9/trunk/src/runlib/msstdint.h

(we can incorporate it because it is licensed under the 3-clause BSD
license.)

[JES: fixed commit message, fixed stripped copyright header]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi cd578bf529 MSVC: Use _snprintf instead of snprintf
In Microsoft's Visual C runtime, the snprintf() function is actually
called _snprintf. Let's just #define the former to call the latter.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 8175f428dc Use correct winsock header
We link to ws2_32.lib which corresponds to the winsock2.h header, not the
winsock.h header.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 3059282751 Include Winsock2 header before windows.h include
That's because there are duplicate #defines, and when Winsock2 is defined
before windows.h then windows.h detects that and prevent redefinition.

See
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a90b143-1fb8-43e9-a54c-956127e0c579/windowsh-and-winsock2h?forum=windowssdk

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 914460cac5 Remove unused variables
This change is technically not required to support MSVC, but it was
detected by Microsoft's compiler.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
dscho 50dbe1df75 Merge pull request #21 from newsoft/master
Fixing two more security issues (remote server crash)
11 years ago
Nicolas Ruff 05a9bd41a8 Do not accept a scaling factor of zero on PalmVNCSetScaleFactor and SetScale client->server messages. This would cause a division by zero and crash the server. 11 years ago
Nicolas Ruff 6037a9074d Check malloc() return value on client->server ClientCutText message. Client can send up to 2**32-1 bytes of text, and such a large allocation is likely to fail in case of high memory pressure. This would in a server crash (write at address 0). 11 years ago
dscho 7c9ef6372d Merge pull request #16 from sandsmark/master
Merge patches from KDE/krfb
11 years ago
Luca Falavigna 4276864096 Merge pull request #17 from dktrkranz/master
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin cdd8675fd9 Fix whitespace
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Luca Falavigna 0c08b5db65 Enable support for ppc64el architecture 11 years ago
Luca Falavigna ce8e04a761 Use Libs.private to avoid unnecessary linkage 11 years ago
Johannes Schindelin 27b0c0deb7 Fix indentation
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
dscho ba710eb145 Merge pull request #20 from newsoft/master
Fix integer overflow in MallocFrameBuffer()
11 years ago
newsoft 85a778c0e4 Check for MallocFrameBuffer() return value
If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to
NULL. Subsequent writes into that buffer could lead to memory
corruption, or even arbitrary code execution.
11 years ago
newsoft 045a044e8a Fix integer overflow in MallocFrameBuffer()
Promote integers to uint64_t to avoid integer overflow issue during
frame buffer allocation for very large screen sizes
11 years ago
Amandeep Singh 012594b970 allow rfbInitSockets with non-ready states.
This allows for reinitializations of e. g. sockets in a SHUTDOWN state.
The only state that doesn't make sense to reinitialize are READY states.
11 years ago
Amandeep Singh afd1d329ed Fix crash in krfb
Krfb crashes on quit, if any client is connected
due to a rfbClientConnectionGone call missing
11 years ago
Will Thompson dca1048239 x11vnc: fix double X_UNLOCK on xrandr events
check_xrandr_event() assumes X_LOCK is taken before it is called, and
currently calls X_UNLOCK on behalf of the caller. But in practice, all
callers assume that the lock is still held after check_xrandr_event()
returns. In particular, this leads to a double-unlock and crash in
check_xevents() on any xrandr event.
11 years ago
dscho 9453be4201 Merge pull request #13 from wjt/fix-double-X_UNLOCK-on-xrandr-event
x11vnc: fix double X_UNLOCK on xrandr events
11 years ago
Will Thompson c4dff87c8f x11vnc: fix double X_UNLOCK on xrandr events
check_xrandr_event() assumes X_LOCK is taken before it is called, and
currently calls X_UNLOCK on behalf of the caller. But in practice, all
callers assume that the lock is still held after check_xrandr_event()
returns. In particular, this leads to a double-unlock and crash in
check_xevents() on any xrandr event.
11 years ago
Johannes Schindelin 3238443dc1 Update LZO to version 2.07
It was reported that LZO has security issues in LMS-2014-06-16-1:
Oberhumer LZO (CVE-2014-4607): http://seclists.org/oss-sec/2014/q2/665

This was also reported by Alex Xu as
https://github.com/LibVNC/libvncserver/issues/9.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
dscho d1a3eb9db5 Merge pull request #7 from waldheinz/init-sfae-padding
Initialize padding in SetFormatAndEncodings' rfbSetPixelFormatMsg.
11 years ago
dscho da7cf4fe2a Merge pull request #6 from waldheinz/cmake-cleanup
Use CMAKE_CURRENT_*_DIR instead of CMAKE_*_DIR.
11 years ago
Matthias Treydte b6b8889306 Initialize padding in SetFormatAndEncodings' rfbSetPixelFormatMsg. 11 years ago
Matthias Treydte 57fcf68844 Use CMAKE_CURRENT_*_DIR instead of CMAKE_*_DIR.
This makes the library friendly to use as a git submodule within another
project, and should change nothing when compiled alone.

For example when having a directory structure like "my_project/external/libvnc",
where in libvnc resides a checkout of libvncserver, one can just reference that
directory from the CMakeLists.txt in my_project with

> add_directory ( external/libvnc )

and add vncclient / vncserver in my_project's taret_link_libraries, one can just
hack away without having to manually make / install LibVNCServer whenever
something is changed there.
11 years ago
dscho 8c21b31cef Merge pull request #4 from dextero/master
x11vnc: adjust blackout region coordinates to the clipping region
11 years ago
dextero f2d516866c x11vnc: adjust blackout region coordinates to the clipping region 11 years ago
Johannes Schindelin 646f844f69 Merge branch 'repeater'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Conflicts:
	.gitignore
11 years ago
Johannes Schindelin a705cd625c libvncclient: If we have TLS support, enable VeNCrypt by default
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 0e19b7c509 Ignore the 'mac' example, too
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 8d558daf05 Ignore the vencrypt document
https://www.berrange.com/~dan/vencrypt.txt

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 186da4f10e Ignore rfbproto.rst
A more up-to-date version of the RFB protocol is maintained by TigerVNC:

	http://sourceforge.net/p/tigervnc/code/HEAD/tree/rfbproto/rfbproto.rst

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 71d0f9b06f Repeater example: show how to shut down cleanly
Since we connected to the client through the repeater, chances are
that we want this server shut down once the client disconnected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin c0e012e4d2 Add an example how to connect to an UltraVNC-style repeater
UltraVNC offers an add-on to connect clients and servers via IDs with
a so-called repeater (e.g. to bridge firewalled clients and servers):

	http://www.uvnc.com/products/uvnc-repeater.html

This example demonstrates how to use that feature with a
LibVNCServer-based server.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago