Commit Graph

138 Commits

Author SHA1 Message Date
Armin Novak
4ba7670e43 Fixed right shift on 32bit platforms. 2017-05-04 09:20:10 +02:00
Armin Novak
d1e7ce9ce0 Fixed FindFirstFileA, do not strip trailing slash 2017-04-27 08:59:21 +02:00
Armin Novak
dafa6cef67 Fixed memory corruption in Find*FileW 2017-04-27 08:31:53 +02:00
Armin Novak
920a76d57e Fix #3922: Use stat insead of lstat 2017-04-19 08:28:00 +02:00
Armin Novak
4e32334621 Added error return in GetFileAttributesExA. 2017-04-11 11:34:11 +02:00
Armin Novak
6e270410ea Fixed broken scoping. 2017-04-06 17:54:44 +02:00
Armin Novak
cb815d6562 Fixed a memory leak and bad free. 2017-04-06 17:46:07 +02:00
David PHAM-VAN
f54326e350 Fix indentation 2017-04-05 15:35:03 -07:00
David PHAM-VAN
30d0bde4ba Fix FindFirstFile return values 2017-03-31 15:33:28 -07: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
ca0398ffc2 Fix FileGetMode writable detection 2017-03-14 12:41:11 -07:00
David PHAM-VAN
1c907d0b09 Fix WinPR FindFirstFile/FindNextFile functions 2017-03-13 14:19:03 -07:00
David PHAM-VAN
bc87fa69df Fix WinPR File creation functions 2017-03-13 14:18:59 -07:00
David PHAM-VAN
07c60ca8a4 Add Windows Errors to File operations 2017-03-13 14:18:55 -07:00
David PHAM-VAN
b89bfaaae4 Add missing functions to WinPR 2017-03-13 14:18:37 -07:00
Armin Novak
c90a0be205 Fixed time conversion in FileSetFileTime. #3508 2017-02-13 15:14:20 +01: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
Armin Novak
88be64f10b Fixed apple file times. 2016-10-06 13:43:04 +02:00
Armin Novak
3eb136d167 Fixed SetFileTime for mac. 2016-09-27 13:28:39 +02:00
Norbert Federa
c16bee759f winpr: several pool and synch fixes
pool:
- the winpr implementation fallback was not used on older windows editions
- drop useless and conflicting TP_CALLBACK_ENVIRON_V3
- fix race conditions by using use proper one-time initialization
- on win32 WinPR tried to load several pool/callback_environment functions
  from kernel32.dll but since these are defined as inline functions in the
  windows headers, no windows edition has ever exported them in any dll.
- removed callback_environment.c and added corresponding static inline
  function to pool.h
- fix segfault in TestPoolWork: CloseThreadpoolWork() must not be called
  if there is a cleanup group associated with the work object since calling
  CloseThreadpoolCleanupGroupMember() already releases the work object

sync:
- The windows headers incorrectly define InitializeCriticalEx support if
  _WIN32_WINNT >= 0x0403 instead of >= 0x0600 (Vista)
- created a compatible define to deal with this issue
2016-06-04 17:09:48 +02:00
Norbert Federa
e718fb324b fix race conditions, tests and some invalid return values
Since the current winpr implementation for overlapped operations is
incomplete and buggy, all affected functions will now fail if they are
called with a set FILE_FLAG_OVERLAPPED flag or a non-null pointer to
a OVERLAPPED structure.

winpr/nt:
- use proper one-time initialization on win32
- fix TestNtCreateFile
- fix broken/incomplete _RtlAnsiStringToUnicodeString
- unimplemented functions return appropriate error codes

winpr/pipe:
- improved TestPipeCreateNamedPipe
- rewrite the completely broken TestPipeCreateNamedPipeOverlapped test

rdtk:
- improve test and don't blindly return success

winpr/synch:
- fix race condition in TestSynchTimerQueue

winpr/ssspi:
- fix TestEnumerateSecurityPackages printf output
- fix TestQuerySecurityPackageInfo printf output

winpr/environment:
- fix GetEnvironmentStrings printf output

winpr/comm:
- unimplemented functions return appropriate error codes

winpr/io:
- unimplemented functions return appropriate error codes

winpr/thread:
- implement SwitchToThread() via sched_yield()
2016-06-01 16:26:26 +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
cedf6d98e2 freerdp: more UWP porting 2016-03-29 20:34:52 -04:00
Marc-André Moreau
4d629a7999 freerdp: UWP porting 2016-03-29 16:03:15 -04:00
Bernhard Miklautz
b184f58c1b winpr/TestFileGetStdHandle: rename variable stdout
stdout shouldn't be used as variable name (can't even be used on
windows).
2016-03-29 18:14:16 +02:00
Martin Fleisz
80cd64732f Merge pull request #3164 from akallabeth/windows_UnixChangeFileMode
Implemented UnixChangeFileMode for windows.
2016-03-16 15:19:11 +01:00
Armin Novak
3d23a772f6 Updated ConvertToUnicode return check. 2016-03-16 13:08:06 +01:00
Marc-André Moreau
ceefc4b099 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-07 10:19:50 -05:00
Armin Novak
34b12362cb Fixed FreeBSD support for filetime settings. 2016-03-06 15:01:58 +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
Armin Novak
c74e37dbfd Implemented UnixChangeFileMode for windows. 2016-03-02 09:41:47 +01:00
Armin Novak
98d4a9347a Added support for android SetFileTime.
Deactivated libjpeg support for android.
2016-02-26 12:27:59 +01:00
Armin Novak
5537230298 Fixed missing iOS UTIME_OMIT. 2016-02-26 11:43:54 +01:00
Armin Novak
436be2441a Implemented SetFileTime 2016-02-26 11:00:17 +01:00
Martin Fleisz
1b881e47d3 winpr/file: Add missing include (io.h) for windows builds 2016-02-23 09:55:55 +01:00
Marc-André Moreau
bfca674f2d Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-02-05 11:39:45 -05:00
Armin Novak
a1617c734c Fixed unused check. 2016-02-03 11:22:27 +01:00
Armin Novak
9b160d4570 Fixed uninitialized value. 2016-01-15 09:33:21 +01:00
Bernhard Miklautz
06307f1ac1 winpr/file: disable buffering
When FILE streams are used per default buffering is enabled but
WriteFile/ReadFile shouldn't do any extra buffering.
2015-12-16 18:47:42 +01:00
Armin Novak
5b2f4f50a0 Fixed FILE* leak and EndOfFile settings. 2015-12-16 17:35:59 +01:00
Armin Novak
6010932984 Fixed possible race on file creation. 2015-12-14 09:32:42 +01:00
Armin Novak
f0e3a2d845 Added extended file seek tests. 2015-12-10 10:40:14 +01:00
Armin Novak
fe51dd1e10 Fixed logging, added file name. 2015-12-10 10:39:37 +01:00
Armin Novak
400d1b8b96 Fixed open mode for fdopen. 2015-12-10 10:37:44 +01:00
Armin Novak
19744f3bb8 Added additional file functions and tests. 2015-12-09 18:29:16 +01:00
Marc-André Moreau
c0c9c9353e winpr: more Win32 fixes 2015-11-25 14:41:32 -05:00
Bernhard Miklautz
0cdb4f7924 Fix compiler warnings
gcc (Debian 4.9.2-10) 4.9.2

winpr/libwinpr/thread/argv.c: In function ‘CommandLineToArgvA’:
winpr/libwinpr/thread/argv.c:94:6: warning: unused variable ‘index’ [-Wunused-variable]
  int index;

winpr/libwinpr/file/test/TestFileGetStdHandle.c: In function ‘TestFileGetStdHandle’:
winpr/libwinpr/file/test/TestFileGetStdHandle.c:44:2: warning: implicit
	declaration of function ‘CloseHandle’ [-Wimplicit-function-declaration]
  CloseHandle(stdout);
    ^
libfreerdp/codec/test/TestFreeRDPRegion.c: In function ‘test_norbert2_case’:
libfreerdp/codec/test/TestFreeRDPRegion.c:697:6: warning: unused variable ‘i’ [-Wunused-variable]
  int i;

channels/cliprdr/server/cliprdr_main.c: In function ‘cliprdr_server_receive_format_list’:
channels/cliprdr/server/cliprdr_main.c:636:24: warning: unused variable ‘cliprdr’ [-Wunused-variable]
  CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
                        ^
channels/cliprdr/server/cliprdr_main.c: In function ‘cliprdr_server_init’:
channels/cliprdr/server/cliprdr_main.c:1097:24: warning: unused variable ‘cliprdr’ [-Wunused-variable]
  CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*) context->handle;
2015-11-09 19:26:34 +01:00
Martin Haimberger
925e4ea4d4 winpr/file: extend API
added windows code
fixed compiler issue
2015-09-15 04:14:30 -07:00