Pierre Ossman
9886e94d9b
Correctly clear out output UTF-16 buffer
Each character is more than one byte, so adjust the clearing of the
buffer to reflect that.
3 years ago
Pierre Ossman
703eb4d130
Correctly handle invalid UTF-16 code points
Some code points are reserved for the UTF-16 coding itself and must not
appear as input data to the algorithm.
3 years ago
Pierre Ossman
d163da9ac8
Fix conversion of latin-1 to UTF-8
Signed bug prevented anything not ASCII from being coded correctly.
3 years ago
Pierre Ossman
6345c0f60f
Fix UTF-16 encoding/decoding of high code points
Everything outside of BMP was handled incorrectly and was coded as
completely different code points.
3 years ago
Pierre Ossman
e61ff736c1
Return the correct number of consumed UTF-8 bytes
This would mess up most conversions from UTF-8 as the caller wouldn't
know how far to step to get to the next valid character, resulting in
markers for invalid data to be injected here and there.
Also add some unit tests to avoid this reoccurring.
3 years ago
Pierre Ossman
02f87f37dd
Fix length checks in string conversion functions
We need to check the buffer length before accessing the incoming
string. Probably not a problem in practice as there should be a
final null in most incoming strings.
Issue found by Pavel Cheremushkin from Kaspersky Lab.
4 years ago
Benoit Gschwind
ff2c39e270
fix test order in convertLF and convertCRLF
The new order of test avoid ready invalid memory address in ca.buf
4 years ago
Pierre Ossman
5fbbe10b6c
Use UTF-8 in clipboard API
In prepartion for better clipboard extensions that can send Unicode
data between the client and server.
5 years ago
Pierre Ossman
56fa782156
Add UTF-8 to/from ISO 8859-1 conversion routines
We convert between UTF-8 and ISO 8859-1 (latin 1) in several places
so create some common routines for this.
8 years ago
Pierre Ossman
546b2ad80a
Make sure clipboard uses \n line endings
This is required by the protocol so we should make sure it is
enforced. We are tolerant of clients that violate this though and
convert incoming clipboard data.
5 years ago
Pierre Ossman
4ae358d561
Remove no longer relevant license comment
8 years ago
Pierre Ossman
a99d14d193
Improved congestion control handling
Refine the previous method by interpolating the values we need.
This reduces the effect of the problem that we cannot send enough
ping packets.
8 years ago
Steve Kondik
b3c9f7ba52
rfb: vsnprintf returns an int, not size_t
Fixes:
/home/shade/dev/tigervnc/common/rfb/util.cxx:55:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
if (len < 0) {
~~~ ^ ~
1 error generated.
6 years ago
Pierre Ossman
921f6c86ba
Display performance statistics in viewer
Adds an optional graph to the viewer to display current frame rate,
pixel rate and network bandwidth. Makes it easier to debug and test
performance related issues.
7 years ago
Pierre Ossman
ba6fbfe368
Give CharArray a printf style method to ease automatic allocation
9 years ago
Pierre Ossman
64624342d9
Shorten stats from EncodeManager using SI/IEC prefixes
Also avoids %lld which isn't supported on Windows.
9 years ago
Pierre Ossman
5ad4d06006
Remove a lot of platform compatibilty stuff
It's either not used, or no longer relevant.
9 years ago
Pierre Ossman
5bc20a6993
Add helper to easily determine how much time has passed since some previous
event.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4783 3789f03b-4d11-0410-bbf8-ca57d06f2519
12 years ago
Adam Tkac
8aee1a8c9d
- use unix/configure.ac as top-level configure.ac base
- create stub top-level Makefile.am
- make common/ subtree compilable
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/unified_buildsys@3892 3789f03b-4d11-0410-bbf8-ca57d06f2519
14 years ago
Adam Tkac
d36b626bbb
Revert previous commit (r3889). Windows code has to be cleaned before this
change.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3890 3789f03b-4d11-0410-bbf8-ca57d06f2519
14 years ago
Adam Tkac
97abe8a548
Replace rfb::strDup by safe_strdup and remove rfb::strFree in favor of free()
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3889 3789f03b-4d11-0410-bbf8-ca57d06f2519
14 years ago
Adam Tkac
3a54922143
[Bugfix] Fixed typo in rfb/util.cxx (caused in r2890)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2916 3789f03b-4d11-0410-bbf8-ca57d06f2519
15 years ago
Adam Tkac
ad1cbd968f
[Cleanup] Handle system dependent defines through autoheader & common-config.h
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2890 3789f03b-4d11-0410-bbf8-ca57d06f2519
15 years ago
Constantin Kaplinsky
a2adc8d4cf
Migrating to new directory structure adopted from the RealVNC's source tree. More changes will follow.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519
18 years ago
Constantin Kaplinsky
de179d4ed7
The "rfb" library merged with VNC 4.1.1 code.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/merge-with-vnc-4.1.1@522 3789f03b-4d11-0410-bbf8-ca57d06f2519
18 years ago
Constantin Kaplinsky
a686690d07
Porting changes for LynxOS 2.3.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@499 3789f03b-4d11-0410-bbf8-ca57d06f2519
18 years ago
Constantin Kaplinsky
47ed8d321c
Initial revision
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2 3789f03b-4d11-0410-bbf8-ca57d06f2519
19 years ago