Commit Graph

37 Commits

Author SHA1 Message Date
Pierre Ossman
25b8412333 Avoid poking around in STREAM internals
It's easy to make mistakes this way, and bypassed the normal bounds
checking. So make sure we always use macros or functions.
2019-05-06 14:33:38 +02:00
Pierre Ossman
75221eb3c5 Separate behaviour of out_uint8a and out_uint8p
Make them more match in_uint8a and in_uint8p in that one copies and
the other just gives you a pointer and it is up to the caller how
to fill it in. This can be useful when other APIs are used to
generate the data as it avoids a temporary buffer.
2019-05-06 14:33:05 +02:00
Pierre Ossman
3e340f2f20 Add explicit STREAM allocation function
Avoids mistakes by making sure everyone allocates these the same
way.

The smart card code still has manual allocation because it has it's
own magical memory management.
2019-05-06 14:33:05 +02:00
Pierre Ossman
e099d79879 Remove dangerous s_check()
This macro checks if a pointer is valid _after_ we've already used
that pointer. So it will only trigger if we're already performed some
for of buffer overflow. As such, it provides little to no value and
can only server to encourage broken behaviour.

Let's remove it and replace it with proper bounds checking before
access instead.
2019-05-06 14:33:05 +02:00
Pierre Ossman
836e008853 Fix fast path stream array
There are 16 possible codes, not 15.

(even if we currently don't know what to do with the last code)
2019-04-12 14:37:24 +02:00
Henrik Andersson
c16b74a974 Run indent-all.sh script on source 2018-10-29 15:53:57 +01:00
Henrik Andersson
8acf574b28 Fix compression regression introduced in commit 0c7b411
When adding support for multi fragments, we started to read and
use length from fast path packet. However a packet can be
compressed and uncompressed length should be used instead.

Fix issue #185
2017-11-03 12:33:00 +01:00
Karl Mikaelsson
0c7b4117ab Enable fragmented Fast-Path Updates
Fragmented updates are concatenated into temporary streams (one per
update type) that are processed when receiving an update with the
FASTPATH_FRAGMENT_LAST bit set.
2017-10-16 14:01:13 +02:00
Karl Mikaelsson
eec94365c4 Improve Fast-Path code readability
Using constants and field definitions from MS-RDPBCGR.
2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3abeca252b Log system pointer changes via Fast-Path updates 2017-10-13 14:02:03 +02:00
Henrik Andersson
87d8d123b8 Rework the logging system
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.

- Same logging api  for all kind of logging and messages to
   end user.

- Adding -v for verbose output when running rdesktop.

- All messages are logged into a subject and with a type, eg:

     logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);

- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
  which specifies subjects of interest, comma separated. There is a special
  subject named All which includes all subject for debug loggin. There is also
  a simple logic opeartor '!' = NOT which can be used in combination like:

    RDESKTOP_DEBUG=All,!Graphics,!Sound

  Which would give debug log output for All subject except Graphics and Sound.
2017-01-26 14:19:40 +01:00
Peter Åstrand
094f3bac04 Fixed style of a few copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1635 423420c4-83ab-492f-b58f-81f9feb106b5
2011-09-28 09:36:59 +00:00
Peter Åstrand
b638882347 Include emails in copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1615 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:13:04 +00:00
Peter Åstrand
5fe3caff71 A few copyright tweaks: added email, years, organization.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1613 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 10:51:50 +00:00
Peter Åstrand
281d7c9f06 Changed license to GPLv3
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1534 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 08:31:06 +00:00
Jay Sorg
fdcd8d7591 added new pointers
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1520 423420c4-83ab-492f-b58f-81f9feb106b5
2009-10-25 21:36:17 +00:00
Jay Sorg
88855ddcbf update the copyright year
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1474 423420c4-83ab-492f-b58f-81f9feb106b5
2008-07-11 03:51:23 +00:00
Jay Sorg
797df4fa02 copyright year update
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1364 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 05:39:39 +00:00
Jeroen Meijer
154a1c895a Tell the server to stop sending window updates when the rdesktop window is unmapped
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@904 423420c4-83ab-492f-b58f-81f9feb106b5
2005-05-20 22:09:32 +00:00
Jeroen Meijer
df0454d183 update comments. Thanks to Scott Marovich (marovich at hpl.hp.com) for pointing out that 3 is probably a synchronise update PDU
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@894 423420c4-83ab-492f-b58f-81f9feb106b5
2005-04-26 22:48:20 +00:00
Jeroen Meijer
696ea0c4f1 Add alternative mppc decompression code with 64kB history buffer from Vahur Sinijärv, and reenable rdp5 (persistent) bitmap cache 2 (64x64)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@888 423420c4-83ab-492f-b58f-81f9feb106b5
2005-04-17 23:14:20 +00:00
Michael Gernoth
daf84b718f silence warnings when connecting to w2k3 sp1 for now
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@884 423420c4-83ab-492f-b58f-81f9feb106b5
2005-04-14 16:46:13 +00:00
Michael Gernoth
ec643e4718 bump version to 1.4.0
change year in files
add missing docu for updated commandline-flags
update changelog


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@827 423420c4-83ab-492f-b58f-81f9feb106b5
2005-03-06 21:11:18 +00:00
Peter Åstrand
c139c48d97 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@781 423420c4-83ab-492f-b58f-81f9feb106b5
2004-10-07 13:00:29 +00:00
Jay Sorg
7f5acf5e64 added option for rdp compression
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@772 423420c4-83ab-492f-b58f-81f9feb106b5
2004-09-11 22:57:42 +00:00
Jay Sorg
125922c748 bring the rdp5 packets through the various layers
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@732 423420c4-83ab-492f-b58f-81f9feb106b5
2004-07-05 19:09:07 +00:00
Jay Sorg
2942c88808 added ui_begin/end_update and rdp_loop for ports
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@712 423420c4-83ab-492f-b58f-81f9feb106b5
2004-06-16 03:08:55 +00:00
Jay Sorg
772bdd5628 changes to compile with g++
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@710 423420c4-83ab-492f-b58f-81f9feb106b5
2004-06-15 22:45:12 +00:00
Peter Kallden
ecdd66ff04 rdp5 decompression, but only <= 8-bit depth.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@686 423420c4-83ab-492f-b58f-81f9feb106b5
2004-04-30 06:18:08 +00:00
Peter Åstrand
0affa3f3ff Applied null cursor patch from jeroen@oldambt7.com
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@507 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-22 10:55:11 +00:00
Jay Sorg
d49e190f92 more g_ prefix for global vars
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@437 423420c4-83ab-492f-b58f-81f9feb106b5
2003-08-01 17:01:58 +00:00
Peter Åstrand
7ff54cdd90 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@434 423420c4-83ab-492f-b58f-81f9feb106b5
2003-07-09 09:18:20 +00:00
Matt Chapman
5b9286e6ea Commit of work in progress on channels (so that other people can hack on
RDPSND), in particular:
* channel layer takes care of virtual channel header
* split X dependent parts out of CLIPRDR, simplified IPC implementation
* initial RDPDR implementation


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@431 423420c4-83ab-492f-b58f-81f9feb106b5
2003-07-01 09:31:25 +00:00
Erik Forsberg
f31cfb5f31 Got (more) info from Jeroen Meijer. Fixed the mysterious opcode 8
using that information. Added a thankyou-comment.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@427 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-23 06:37:50 +00:00
Matt Chapman
2c32c1ec3a Eliminate previous ugly hack for RDP5 packets, in order to make it work
with low encryption.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@422 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-17 08:44:32 +00:00
Erik Forsberg
5f9d3feb42 Find and execute channel-specific callback when there is channel data.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@410 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-06 10:48:38 +00:00
Erik Forsberg
b2df34f3fc Initial version. Combined code from Matt's RDP5 adventures with some of
my own discoveries.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@342 423420c4-83ab-492f-b58f-81f9feb106b5
2003-03-27 13:07:28 +00:00