Commit Graph

127 Commits

Author SHA1 Message Date
Ilya Shipitsin
14c15c680d resolve several possible null pointer dereference
issue detected by cppcheck

[channels/drive/client/drive_main.c:454] -> [channels/drive/client/drive_main.c:443]: (warning) Either the condition '!irp' is redundant or there is possible null pointer dereference: irp.
[client/X11/xf_window.c:582] -> [client/X11/xf_window.c:580]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[winpr/libwinpr/path/test/TestPathShell.c:40] -> [winpr/libwinpr/path/test/TestPathShell.c:43]: (warning) Either the condition '!path' is redundant or there is possible null pointer dereference: path.
[winpr/libwinpr/path/test/TestPathShell.c:49] -> [winpr/libwinpr/path/test/TestPathShell.c:52]: (warning) Either the condition '!path' is redundant or there is possible null pointer dereference: path.
2018-03-24 17:46:39 +05:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Martin Fleisz
9b4de7903f drive: Fix possible NULL ptr access 2018-03-06 16:34:36 +01:00
David Fort
a132922376 Add checks for DR channel 2017-10-04 10:30:47 +02:00
David Fort
b624ecbfce Fix for #4161
The checks were wrong, fix them.
2017-10-02 20:57:27 +02:00
Bernhard Miklautz
bbd11eef1d Merge pull request #4045 from akallabeth/drive_fixes_overlayfs
Drive fixes overlayfs
2017-09-22 17:22:00 +02:00
Armin Novak
32de218c3f Fixed file seek. 2017-08-08 10:52:11 +02:00
Armin Novak
d1ebc39b07 Fixed file errno mapping. 2017-07-24 15:05:48 +02:00
Armin Novak
9a2c9c47d7 Fixed buffer read. 2017-07-24 11:32:54 +02:00
Armin Novak
6a06c8d991 Additional error checks for drive channel. 2017-07-24 11:31:48 +02:00
Armin Novak
478ca97a16 Fixed resource cleanup. 2017-07-20 09:35:41 +02:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Norbert Federa
36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00
weizhenwei
bd94dcc6d5 remove duplicate code when freeing drive 2017-06-23 09:28:42 +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
a2ecf403b2 fix memory leak at drive_register_drive_path() and drive_free() 2017-06-21 15:26:28 +08:00
Armin Novak
98736c9d4d Fix #3995: File size information 2017-06-09 13:02:50 +02:00
joy.you
921f0b7480 fixed issue:#3974
ConvertToUnicode failed
2017-05-27 16:10:41 +08:00
Armin Novak
ed2c675a83 Fixed path length check. 2017-05-18 09:43:02 +02:00
Armin Novak
6b960a4319 Fix #3962: Remove trailing slashes from path. 2017-05-17 16:43:16 +02:00
Armin Novak
0a309fcbec Use unicode constants for WCHAR 2017-05-17 16:17:16 +02:00
Ilya Shipitsin
c78a2f0333 resolve issues identified by cppcheck
[channels/drive/client/drive_file.c:125]: (error) Memory leak: path_slash
[server/Windows/wf_dxgi.c:195]: (error) Invalid number of character '(' when these macros are defined: 'WITH_DXGI_1_2'.
2017-05-01 16:40:02 +05:00
Armin Novak
73e89bffcc Cleaned up includes. 2017-04-19 08:27:22 +02:00
David PHAM-VAN
b46aaeb973 Fix memory leaks, Mixed declarations 2017-03-27 11:15:22 -07:00
David PHAM-VAN
5a66fe841a Misc Fixes 2017-03-17 14:07:33 -07:00
David PHAM-VAN
d6f78df195 Verify ConvertFromUnicode return values 2017-03-16 16:27:01 -07:00
David PHAM-VAN
459d3a0473 Fix Windows build 2017-03-16 16:20:48 -07:00
David PHAM-VAN
9c596b70a6 Fix Android build 2017-03-14 10:48:10 -07:00
David PHAM-VAN
9a76a43088 Add specific Xrdp workarounds
This reverts commit 36d95d73715bd081019538c55f74294aa9faffba.
2017-03-13 14:18:50 -07:00
David PHAM-VAN
c7924b554d Rewrite drive channel using WinPR functions 2017-03-13 14:18:46 -07:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
pentagra
df2b5c9cdf ifdef's for Cygwin compilation 2017-02-10 18:06:20 +03: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
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -05:00
Armin Novak
9f5da483dc Reformatted files touched in last 2 commits. 2016-10-06 13:43:12 +02:00
Armin Novak
88a3b8dd76 Initializing channel context in each thread. 2016-10-06 13:43:12 +02:00
Norbert Federa
90cdfa7646 cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS 2016-06-15 13:36:27 +02:00
Marc-André Moreau
915b9a15b1 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	winpr/libwinpr/bcrypt/CMakeLists.txt
2016-05-11 11:05:17 -04:00
Marc-André Moreau
4d629a7999 freerdp: UWP porting 2016-03-29 16:03:15 -04:00
Armin Novak
43b13ffcd2 Replace SetFilePointerEx with SetFilePointer. 2016-03-17 09:34:24 +01:00
David PHAM-VAN
2f28b6c38b Improve code using more winpr functions 2016-03-02 10:01:51 -08:00
David PHAM-VAN
a20950faa0 Implement FileAllocationInformation 2016-03-02 10:01:51 -08:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Armin Novak
5acd80dd5b Exporting channel entry points. 2016-02-29 15:18:19 +01:00
David PHAM-VAN
8ebe5b9930 Fix bad malloc size in statvfs 2016-02-26 09:45:35 -08:00
Bernhard Miklautz
e6f013eac7 fix spelling
replace occured with occurred
Fixes #3142
2016-02-22 17:01:43 +01:00
Bernhard Miklautz
6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Armin Novak
cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00