summaryrefslogtreecommitdiffstats
path: root/common/rfb/util.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Correctly clear out output UTF-16 bufferPierre Ossman2020-10-051-1/+1
| | | | | Each character is more than one byte, so adjust the clearing of the buffer to reflect that.
* Correctly handle invalid UTF-16 code pointsPierre Ossman2020-10-051-1/+1
| | | | | Some code points are reserved for the UTF-16 coding itself and must not appear as input data to the algorithm.
* Fix conversion of latin-1 to UTF-8Pierre Ossman2020-10-051-2/+2
| | | | Signed bug prevented anything not ASCII from being coded correctly.
* Fix UTF-16 encoding/decoding of high code pointsPierre Ossman2020-10-051-3/+4
| | | | | Everything outside of BMP was handled incorrectly and was coded as completely different code points.
* Return the correct number of consumed UTF-8 bytesPierre Ossman2020-10-051-0/+2
| | | | | | | | 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.
* Fix length checks in string conversion functionsPierre Ossman2019-09-251-16/+16
| | | | | | | | 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.
* Use UTF-8 in clipboard APIPierre Ossman2019-07-011-0/+218
| | | | | In prepartion for better clipboard extensions that can send Unicode data between the client and server.
* Add UTF-8 to/from ISO 8859-1 conversion routinesPierre Ossman2019-07-011-0/+166
| | | | | We convert between UTF-8 and ISO 8859-1 (latin 1) in several places so create some common routines for this.
* Make sure clipboard uses \n line endingsPierre Ossman2019-07-011-0/+56
| | | | | | 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.
* Remove no longer relevant license commentPierre Ossman2018-03-281-14/+0
|
* Merge branch 'congestion' of https://github.com/CendioOssman/tigervncPierre Ossman2018-02-261-6/+25
|\
| * Improved congestion control handlingPierre Ossman2017-11-171-6/+25
| | | | | | | | | | | | Refine the previous method by interpolating the values we need. This reduces the effect of the problem that we cannot send enough ping packets.
* | rfb: vsnprintf returns an int, not size_tSteve Kondik2017-07-101-1/+1
|/ | | | | | | | | 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.
* Display performance statistics in viewerPierre Ossman2017-02-241-6/+8
| | | | | | 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.
* Give CharArray a printf style method to ease automatic allocationPierre Ossman2015-03-031-0/+24
|
* Shorten stats from EncodeManager using SI/IEC prefixesPierre Ossman2015-03-031-0/+41
| | | | Also avoids %lld which isn't supported on Windows.
* Remove a lot of platform compatibilty stuffPierre Ossman2014-07-071-91/+0
| | | | It's either not used, or no longer relevant.
* Add helper to easily determine how much time has passed since some previousPierre Ossman2011-11-081-0/+16
| | | | | | | event. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4783 3789f03b-4d11-0410-bbf8-ca57d06f2519
* - use unix/configure.ac as top-level configure.ac baseAdam Tkac2009-09-041-2/+2
| | | | | | | | - 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
* Revert previous commit (r3889). Windows code has to be cleaned before thisAdam Tkac2009-09-041-14/+14
| | | | | | | change. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3890 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Replace rfb::strDup by safe_strdup and remove rfb::strFree in favor of free()Adam Tkac2009-09-041-14/+14
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3889 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Bugfix] Fixed typo in rfb/util.cxx (caused in r2890)Adam Tkac2008-10-081-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2916 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Cleanup] Handle system dependent defines through autoheader & common-config.hAdam Tkac2008-10-061-0/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2890 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Migrating to new directory structure adopted from the RealVNC's source tree. ↵Constantin Kaplinsky2006-05-251-0/+184
More changes will follow. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519