Commit Graph

2994 Commits

Author SHA1 Message Date
Mike Gilbert
445bd9a80c winpr: fix fallback timezone name
Populate StandardName and DaylightName with 2-byte WCHAR values instead
of 4-byte wchar_t values on Linux.
2024-04-20 21:19:59 +02:00
Mike Gilbert
ca8c71a208 winpr: improve timezone detection when TZ is set
The TZ variable may either contain a direct timezone representation, or
a reference to a file in tzfile(5) format. Mapping a direct timezone
representation to a Windows timezone would be difficult.

According to tzset(3), a file reference should start with a colon, though
glibc treats it as optional. It may be an absolute path or a path relative
to /usr/share/zoneinfo. Adjust winpr_detect_windows_time_zone to accept
either.
2024-04-20 21:19:59 +02:00
akallabeth
71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
Armin Novak
7f896b649e [winpr,clipboard] fix resource leak 2024-04-17 18:47:16 +02:00
Armin Novak
28e9094f08 [gcc] fix missing malloc warning macros
* Add missing WINPR_ATTR_MALLOC
* Add missing WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
2024-04-17 18:47:16 +02:00
Armin Novak
2500fb7bfb [cleanup] refactor some checks 2024-04-15 12:40:01 +02:00
Armin Novak
140b4d7fcb [coverity] 1543161 Data race condition 2024-04-15 12:40:01 +02:00
Armin Novak
237dfcbd9f [coverity] 1543163 Unintentional integer overflow 2024-04-15 11:30:31 +02:00
Armin Novak
a75ddcc091 [coverity] 1543036 Unintentional integer overflow 2024-04-15 11:30:31 +02:00
Armin Novak
98fa2d406d [coverity] 1543226 Data race condition 2024-04-15 11:30:31 +02:00
Armin Novak
e4498df607 [coverity] 1543089 Data race condition 2024-04-15 11:30:31 +02:00
Armin Novak
e3f3f85391 [coverity] 1543117 Argument cannot be negative 2024-04-15 11:30:31 +02:00
akallabeth
0c9fb50170 [coverity] fix unchecked return 2024-04-12 13:30:35 +02:00
akallabeth
c9850bb299 [coverity] 1543134 Explicit null dereferenced 2024-04-12 12:41:42 +02:00
akallabeth
8f9707897c [coverity] 1543219 Dereference before null check 2024-04-12 12:41:42 +02:00
akallabeth
0304897f7b [coverity] 1543175 Dereference null return value 2024-04-12 12:41:42 +02:00
akallabeth
dba673b678 [coverity] 1543077 Dereference null return value 2024-04-12 12:41:42 +02:00
akallabeth
9ced090cea [coverity] 1543043 Dereference null return value 2024-04-12 12:41:42 +02:00
akallabeth
68f0e0a325 [winpr] WINPR_ATTR_MALLOC HANDLE functions
mark functions creating handles with WINPR_ATTR_MALLOC to ensure
compiler checks for proper handle close
2024-04-12 12:41:42 +02:00
akallabeth
0a34b1e95d [coverity] 1543271 Explicit null dereferenced 2024-04-12 09:45:09 +02:00
akallabeth
0c7537c840 [coverity] 1543230 Missing unlock 2024-04-12 09:45:09 +02:00
akallabeth
6217076b47 [coverity] 1543030 Dereference before null check 2024-04-12 09:45:09 +02:00
akallabeth
f9d4b75610 [coverity] 1543101 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
e9e9e42a71 [coverity] 1543211 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
3a76eccf16 [coverity] 1543171 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
79d3825df0 [coverity] 1543256 Dereference null return value 2024-04-12 09:45:09 +02:00
akallabeth
61062128e2 [coverity] 1543067 Out-of-bounds read 2024-04-12 09:45:09 +02:00
akallabeth
e063d26bfe [coverity] 1543053 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
960b35d09c [coverity] 1543038 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
19d9afc0b4 [coverity] 1543289 Double free 2024-04-12 09:45:09 +02:00
akallabeth
d865321571 [coverity] 1543221 Resource leak 2024-04-11 12:04:07 +02:00
akallabeth
8bef31fdae [coverity] 1543108 Resource leak 2024-04-11 12:04:07 +02:00
akallabeth
843ecfc01a [coverity] 1543172 Pointer to local outside scope 2024-04-11 12:04:07 +02:00
akallabeth
3997eeb5b3 [coverity] 1543227 Readlink used insecurely 2024-04-11 12:04:07 +02:00
akallabeth
3b04ab95d4 [coverity] 1543146 Use after free 2024-04-11 12:04:07 +02:00
akallabeth
9768a5f48f [coverity] 1543257 Buffer not null terminated 2024-04-11 12:04:07 +02:00
akallabeth
4a56e2f74c [winpr,kerberos] use profile_abandon
suggested by @greghudson to just release the profile and not flush
changes back to config file. See #9766
2024-04-03 15:37:43 +02:00
Armin Novak
18612bb513 [mingw] fix missing shlwapi link 2024-04-02 09:31:55 +02:00
Kai Pastor
4b52dfd70c Add #include to declare winpr_strerror 2024-04-01 09:31:57 +02:00
akallabeth
678ff144ab [cmake] unify windows resource file generation
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +01:00
akallabeth
09ff2966af [cmake] unify BSD related configuration in PlatformDefaults.cmake 2024-03-20 09:11:08 +01:00
akallabeth
92ed8b3916 [winpr,timezone] outside definition timezone file
allow defining the filepath of timezone file in buildsystem adjusting it
without a required code change.
2024-03-20 09:11:08 +01:00
akallabeth
f4b7c59915 [cmake] move platform defines to common include
* Move platform specific settings to a common CMake include
2024-03-20 09:11:08 +01:00
akallabeth
1bf3f5335e [winpr,file] clean up FileSetFileTime
* Split POSIX and BSD implementations
* Add stub for unuspported platforms
2024-03-20 09:11:08 +01:00
Kai Pastor
c8c70ad730 Don't remove duplicate link libs 2024-03-19 08:33:54 +01:00
akallabeth
91b143be54 [winpr,clipboard] fix WCHAR buffer size 2024-03-18 22:33:54 +01:00
akallabeth
4b73e7525c [winpr,crt] fix incompatible WCHAR pointer 2024-03-18 13:27:32 +01:00
akallabeth
199b51cebb [winpr,smartcard] fix incompatible PCSC_SCardListReaders pointer 2024-03-18 13:27:32 +01:00
akallabeth
18ce4b35ce [winpr,clipboard] fix incompatible WCHAR pointer 2024-03-18 13:27:32 +01:00
akallabeth
1c0bab542b [winpr,sysinfo] clock_gettime is available since POSIX 1993 2024-03-18 08:52:22 +01:00