Commit Graph

53 Commits

Author SHA1 Message Date
Armin Novak
58c4e639f1 Fixed type mismatch. 2019-06-25 10:49:53 +02:00
Martin Fleisz
20c4e3bab0
Merge pull request #5415 from akallabeth/dump_append_fix
Fixed format security issues.
2019-06-04 09:14:59 +02:00
Martin Fleisz
1f5ded4611 RAIL: Fix parsing of WINDOW_ORDER_FIELD_ICON_OVERLAY_NULL (#5421) 2019-06-03 09:05:43 +02:00
Armin Novak
c6e1208457 Fixed format security issues. 2019-05-24 09:28:08 +02:00
David Fort
6563bc28c4 rail: added verbose logs (#5402)
* rail: added verbose logs

* rail: fix buffer initialisation in debug message
2019-05-23 12:15:26 +02:00
Armin Novak
95a7447366 Fixed window order cleanup for NOTIFY_ICON_STATE_ORDER 2019-05-09 13:24:22 +02:00
Armin Novak
2cc714a57d Updated RAILS implementation
* Implement new messages and callbacks
* Announce most recent channel features
* Added settings to configure flags to announce
2019-05-08 17:25:15 +02:00
Armin Novak
4d7bece6ea Fixed order mask 2018-11-15 09:52:54 +01:00
Armin Novak
dd80a09781 Allow window orders with AllowUnanouncedOrdersFromServer 2018-11-15 09:52:54 +01:00
Armin Novak
c0b13cf43f Added checks for order type window support. 2018-11-15 09:52:50 +01:00
Armin Novak
98a537d05d Better description and formatting for update_read_icon_info 2018-11-14 11:57:57 +01:00
Armin Novak
7e12955c55 Made all internal functions static. 2018-11-14 11:57:57 +01:00
ilammy
7a2b6e1301 libfreerdp-core: fix reading TS_ICON_INFO
The spec says that CbColorTable field is present when Bpp is 1, 4, 8.
Actually, bpp == 2 is not supported by TS_ICON_INFO according to the
spec (though, DIB definitely supports 16-color images).

    MS-RDPERP 2.2.1.2.3 Icon Info (TS_ICON_INFO)

    CbColorTable (2 bytes):
        This field is ONLY present if the bits per pixel (Bpp)
        value is 1, 4, or 8.

Omitting 8-bit value breaks 256-color icons which are incorrectly
read with color and alpha data mixed up.
2018-11-14 10:53:45 +01:00
Armin Novak
83fba667c1 Fixed logging. 2018-10-15 13:56:19 +02:00
Bernhard Miklautz
e7cd3250c3 Fix a regression introduced with PR #4013
If numWindowRects/numVisibilityRects is zero a realloc might either
return NULL or a free able memory. In the first case the introduced
regression caused a double free.
As 0 is a possible value that can be received in both cases rail was
broken.

Fixes #4022
2017-06-29 11:28:03 +02:00
weizhenwei
ef540ee2df code format adjustment 2017-06-23 09:50:56 +08:00
weizhenwei
5d8d3b53c5 remove redundant NULL pointer check 2017-06-23 09:44:40 +08:00
weizhenwei
3b52a60d31 remove useless NULL pointer check before free 2017-06-23 09:21:16 +08:00
weizhenwei
61b24bf0b3 add NULL pointer check and set freed pointers to NULL afterward 2017-06-22 17:53:51 +08:00
weizhenwei
fa1c65b656 refactor to remove duplicate code and replace free+malloc with realloc 2017-06-22 10:21:20 +08:00
weizhenwei
2d56e22e9e refactor on redundant code copy 2017-06-21 22:07:07 +08:00
weizhenwei
d77802d5e9 fix memroy leak of window_icon->iconInfo at update_read_window_icon_order() 2017-06-21 15:26:28 +08:00
weizhenwei
2f96df25fa fix memory leak at update->window->window_state.windowRects/visibilityRects at update_read_window_state_order() 2017-06-21 15:26:28 +08:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Norbert Federa
ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
David FORT
7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Hardening
f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
David FORT
c330a3715e Fix empty window title
When the size of a RAIL string was 0, we were reporting an OOM error.
2015-05-07 15:08:00 +02:00
Jonathan Kaplan
8dee5dab27 Fix issue when numWindowIds is 0 2015-04-28 00:21:38 -07:00
Armin Novak
6b0667c959 Fixed use after free and realloc checks. 2015-03-31 15:18:45 +02:00
Zhang Zhaolong
99b14815a5 core: fix incorrect usage of realloc.
realloc can handle the case that its first parameter is NULL.

Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 13:40:20 +08:00
Marc-André Moreau
589c21d819 libfreerdp-utils: remove rail utils 2014-11-12 10:18:53 -05:00
Armin Novak
2f519d7f16 Replaced logging in libfreerdp with wlog defines. 2014-09-15 08:48:46 +02:00
Armin Novak
f4c133eaf8 Replaced custom logging mechanism with WLog wrapper. 2014-08-07 16:51:24 +02:00
Hardening
07e0eba7db Check that bpp has reasonable value
As bpp is often used for malloc computations, let's check that it has
a reasonable value.
2014-05-29 10:12:02 +02:00
Marc-André Moreau
3cd5652c7d libfreerdp-core: fix asynchronous queueing of RemoteApp messages 2013-10-22 16:28:23 -04:00
Marc-André Moreau
3e41d5da87 libfreerdp-rail: minor cleanup 2013-10-15 22:42:07 -04:00
Marc-André Moreau
a24d31be31 libfreerdp-core: refactor and add new WLog debug output for graphical orders 2013-10-10 13:00:04 -04:00
Armin Novak
e2e96b8c55 Fixed clang issues. 2013-09-05 12:14:34 +02:00
Armin Novak
e5c138a5b9 Fixed various memory leaks, allocation size issues and API misuse
warnings shown by clang as well as some compiler warnings.
2013-09-05 12:14:34 +02:00
Marc-André Moreau
5b92413843 freerdp: purge deprecated stream utils 2013-05-08 16:09:16 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Marc-André Moreau
a8201b0d1b libwinpr-utils: combine old and new stream utils 2013-03-21 15:19:33 -04:00
rdp.effort
4d90284657 Renamed CODEC_ID_NONE to RDP_CODEC_ID_NONE as it is already defined in
avcodecs.h
Fixed a warning in schannel_openssl.c
Added checks for: input, mcs, tpdu, certificate, license
2013-01-12 14:49:01 +01:00
Marc-André Moreau
8a32de3801 libfreerdp: purged source tree from deprecated memory utils 2012-11-21 21:22:06 -05:00
Marc-André Moreau
b2c3ca8cc4 libfreerdp-utils: replace all calls to deprecated function xzalloc 2012-11-21 19:22:41 -05:00
Marc-André Moreau
9d064171a7 freerdp: get rid of old types 2012-10-09 03:26:39 -04:00
Marc-André Moreau
1bf8a45519 freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 2012-10-09 03:01:37 -04:00
Marc-André Moreau
9909a12af5 libfreerdp-utils: get rid of xmalloc, xrealloc and xfree 2012-10-08 23:21:26 -04:00
Marc-André Moreau
e60a092d81 freerdp: fix headers 2012-10-08 23:02:04 -04:00