Commit Graph

2029 Commits

Author SHA1 Message Date
Bernhard Miklautz 68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Bernhard Miklautz f24240630d Merge pull request #2759 from bmiklautz/fix/cliprdp
x11/cliprdr: handle empty format names
2015-07-02 16:28:55 +02:00
Bernhard Miklautz b6a799e5d0 x11/cliprdr: handle empty format names
The recently added strdup checks ignored the fact that format names
can be NULL.
2015-07-02 15:39:35 +02:00
Hardening c8a71a2695 Merge pull request #2747 from ilammy/egfx-missing-events
Do not discard events when updating EGFX surface mapping
2015-07-02 15:08:31 +02:00
ilammy 1012bccdaa client/x11: do not discard events when updating EGFX surface mapping
Passing True to XSync() discards any pending X11 events. Occasionally
this caused ButtonRelease or KeyRelease to be lost and not forwarded
to the remote computed, leading to stuck keys and buttons.

This should resolve issue #2391
2015-06-30 12:48:08 +03:00
Bernhard Miklautz 1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Marc-André Moreau cf2f4bf9cf Merge pull request #2737 from nfedera/nf-fix-gdi-return-value-weirdness
libfreerdp/gdi: fixed gdi return value madness
2015-06-26 09:24:08 -04:00
Norbert Federa ac95b7274e Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
2015-06-26 15:01:08 +02:00
Norbert Federa bb9536b867 libfreerdp/gdi: fixed gdi return value madness
Mostly booleanization to comply with the MS API
2015-06-26 14:32:38 +02:00
Marc-André Moreau ddf2519f1e Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
2015-06-26 08:27:22 -04:00
Armin Novak 8165031eb4 Fixed windows client pre_connect return. 2015-06-26 13:13:32 +02:00
Armin Novak 6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Armin Novak e969049aa3 Removed unused variable and incorrect comment. 2015-06-23 16:20:59 +02:00
Armin Novak 2f81d99327 Added missing argument checks. 2015-06-23 12:17:37 +02:00
Armin Novak d83af81295 Fixed uninitialized value. 2015-06-23 12:12:16 +02:00
Bernhard Miklautz 09445c2b0e nla and cmdline: integrated feedback
* fix possible problems with 0 size lengths
* add return value checks
2015-06-23 10:14:11 +02:00
Bernhard Miklautz af81a91ea7 windows: fix compilation and warnings 2015-06-22 19:31:25 +02:00
Bernhard Miklautz 06502e6a91 misc: integrate pull request feedback 2015-06-22 19:24:30 +02:00
Bernhard Miklautz 421b74e85e client/locale: properly check popen return value
popen returns NULL if an error occurs and not < 0.
2015-06-22 19:23:58 +02:00
Bernhard Miklautz 19afc6906c client/android: reset debug level to default
* WLOG debug level was hard coded to DEBUG which generates a lot of
  noise
* remove indecent and unneeded debug message
2015-06-22 19:23:58 +02:00
Bernhard Miklautz 1b8dd139a9 cmd line: add missing checks
* strdup
* some allocs
2015-06-22 19:23:57 +02: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
Bernhard Miklautz 749d93ae39 client/android: misc updates and fixes
* increase minimum required SDK to 14
* change functions from void to BOOL where required to have proper
  return values
* update the JAVA classes and JNI accordingly
* add return value checks for *alloc and strdup
2015-06-22 19:10:00 +02:00
Bernhard Miklautz 77927c213e android: fix misc compiler warnings
with gcc version arm-linux-androideabi-gcc (GCC) 4.8
2015-06-22 19:09:59 +02:00
Bernhard Miklautz d9d1759abc Fix compiler warnings:
gcc 4.7.2

client/X11/xf_keyboard.c: In function ‘xf_keyboard_action_script_init’:
client/X11/xf_keyboard.c:48:6: warning: unused variable ‘exitCode’
[-Wunused-variable]

gcc 4.9

client/X11/xf_client.c: In function ‘xf_client_thread’:
client/X11/xf_client.c:1537:3: warning: ‘inputThread’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
2015-06-22 19:09:59 +02:00
Bernhard Miklautz 196695e011 client/ios: fix unchecked strdups 2015-06-22 19:09:59 +02:00
Bernhard Miklautz bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Armin Novak a7943a53cd Setting hostname as default domain now. 2015-06-18 16:07:25 +02:00
Armin Novak c3e368bd4b Fixed typo and invalid domain name. 2015-06-18 16:07:09 +02:00
Armin Novak e563b2b62e Fixed domain setting for windows client. 2015-06-18 13:01:28 +02:00
Armin Novak 90cc7eb3c8 UPN syntax fix: domain must be empty, not NULL. 2015-06-18 13:01:23 +02:00
Armin Novak 427d85f5f0 Added user setting if no domain provided. 2015-06-18 12:01:17 +02:00
Armin Novak d5c3f210e9 Fixed variable parsed. 2015-06-18 11:49:16 +02:00
Armin Novak 64529b6d60 Using last @ for domain split.
Command line parser splits username after
parsing all options.
2015-06-18 11:35:22 +02:00
Armin Novak 3e26940547 Allowing UPN syntax for user. 2015-06-15 09:47:16 +02:00
Norbert Federa f04bb6c53d xfreerdp: xfc->palette wasn't updated with /gdi:sw
When using software gdi (/gdi:sw) the rdp update PDU callback
gdi_palette_update() is used which writes the new colors to
the rdpContext's gdi->palette buffer.
The X11 functions however access xfc->palette which gets only
updated by xf_gdi_palette_update() which is the callback if
/gdi:hw is used.

This commit changes xfc->palette to a pointer which points to
xfc's private buffer with /gdi:hw or to the gdi->palette if
software gdi is used.
2015-06-11 18:40:41 +02:00
Norbert Federa 87683ec87b client/windows: invalid usage of S_FALSE HRESULT
S_FALSE is a success code and not an error (note the S_)
2015-06-03 16:06:01 +02:00
Norbert Federa 77769f10b6 winpr: fixed HRESULT & SCODE types, added a ctest
- HRESULT was unsigned which means that until now all usages of the
  SUCCEDED(hr) and FAILED(hr) macros never detected any errors
- Also fixed the (unused) SCODE typedef
- Added new ctest TestTypes
2015-06-02 19:52:52 +02:00
Hardening 29de9b6d4e Merge pull request #2658 from hardening/fix_2657
Fix for #2657
2015-05-29 17:58:30 +02:00
David FORT 12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
ivan-83 83a40a32a7 * tsmf: OSS code cleanup
+ urbdrc: add devd support (not tested)
* fix FindUUID detection ubder BSD
* wlog: fix prev commit: build error on Windows
* cmdline: add /usb syntax help
2015-05-27 22:58:41 +03:00
ivan-83 94a7abd2af + tsmf: OSS initial suppot (not work yet)
* tsmf: fix video playback on FreeBSD (proper shared object name)
* tsmf: renamed args: audio->sys, audio-dev->dev
* audin: OSS fix, now it work
* cmdline: add syntax help for /audin, /rdpsnd, /tsmf
* add debug messages
2015-05-27 22:54:13 +03:00
David FORT 85c350f5da Fix for #2657 2015-05-27 15:13:43 +02:00
Norbert Federa 8a53e5ee68 client/iOS: fix ios_context_new
- fixed wrong signature since ContextNew is BOOL now
- added error checking
2015-05-25 22:21:53 +02:00
Marc-André Moreau 5526348079 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-05-21 13:29:59 -04:00
Marc-André Moreau b9c1cddc2e Merge pull request #2583 from bceverly/OpenBSD-cleanup
Two minor source code changes to remove warnings
2015-05-21 10:17:54 -04:00
Norbert Federa cd0a8e0506 Merge pull request #2630 from hardening/new_2616
Add checks for some XXX_New and XXX_Add functions
2015-05-21 16:04:26 +02:00
David FORT b83af4c059 Fixed declaration of xf_event_action_script_init() 2015-05-20 21:01:46 +02:00
David FORT 29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02:00