akallabeth
516668d02b
[fclose] ensure no invalid pointers are passed.
...
fclose has undefined behaviour for NULL pointers, so check for these.
2023-04-28 07:39:35 +02:00
akallabeth
8ed37e68d2
[stream] use logging capacity checks
2023-01-25 14:27:32 +01:00
akallabeth
784becd946
[winpr,image] add winpr_bitmap_write_ex
...
Added a helper function writing a bitmap from an image that has a stride
that is not width * <bytes per pixel>
2022-12-16 11:03:13 +01:00
Armin Novak
5476d48025
Use Stream_StaticInit for bitmap read
2022-10-10 15:29:45 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes ( #7796 )
...
* Fixed remdesk settings pointer
* Fixed sign warnings in display_write_monitor_layout_pdu
* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context
* Added and updates settings
* info assert/dynamic timezone
* mcs assert/log/flags
* Fixed and added assertions for wStream
* Unified stream length checks
* Added new function to check for lenght and log
* Replace all usages with this new function
* Cleaned up PER, added parser logging
* Cleaned up BER, added parser logging
* log messages
* Modified Stream_CheckAndLogRequiredLengthEx
* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list
* Improved Stream_CheckAndLogRequiredLength
* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected
* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
Armin Novak
10e40147fb
Fixed various const warnings
2022-02-01 10:25:37 +00:00
akallabeth
3ccb96d52f
Fixed #7350 : Warnings with Stream_StaticInit
...
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
1af7ef2f1b
Fixed compilation warnings and typos
2021-06-16 15:21:56 +02:00
Armin Novak
f5bb6d12fc
Fixed compilation warnings
2021-06-16 14:26:06 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers ( #7043 )
...
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
Marc-André Moreau
eb6777ea69
Fix Windows Unicode file path handling issues (+add winpr_fopen wrapper)
2021-05-26 08:40:29 +02:00
akallabeth
ad93ff3f0d
Fixed #6632
2020-12-06 14:48:21 +01:00
Kobi Mizrachi
920acd4c0e
winpr: image: add API to construct bmp header
2020-06-05 09:22:26 +02:00
akallabeth
dffd893dc5
Fixed integer overflow in winpr_image_bitmap_read_buffer
...
Thanks to hac425
2020-05-08 11:04:03 +02:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
kubistika
b3f78d2f4d
winpr: utils: image: fix const correctness
2019-10-24 12:19:31 +02:00
Armin Novak
0a9ef97a57
Fixed uninitialized variable.
2017-12-12 10:35:02 +01:00
Armin Novak
c91900dfb3
Fixed big endian issues with bitmap read.
2017-11-24 12:03:46 +01:00
Bernhard Miklautz
52fbfb7b12
fix clang warnings, directly include wtypes.h ( #4097 )
...
* build: clang use -Wno-unused-command-line-argument
With clang 5.0 builds are quite noisy otherwise.
* Directly include wtypes.h
Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used.
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: parentheses-equality
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: tautological-compare
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning:
incompatible pointer types passing 'size_t *' (aka 'unsigned
long *') to parameter of type 'UINT32 *' (aka 'unsigned int *')
[-Wincompatible-pointer-types]
2017-08-29 09:09:38 +02:00
Armin Novak
c3d4b7d262
fseeko and ftello for 64bit file support.
2017-08-14 08:42:49 +02: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
David PHAM-VAN
3d22cbe2b8
Fix png image loading that needed write access
2016-01-27 11:02:16 -08:00
Armin Novak
5cad081cc8
Fixed memory leak.
2015-08-28 11:07:25 +02:00
Bernhard Miklautz
1cee185e3c
hardening: check fread and fwrite return values
2015-06-26 20:38:30 +02:00
Armin Novak
ad41fc59a3
Fixed reading bitmap from buffer.
2015-04-20 15:13:23 +02:00
Armin Novak
e5cdd8a299
Fixed bitmap reading bug.
2015-04-19 12:29:17 +02:00
Marc-André Moreau
334dec3c1f
winpr: add pragma pack, bitmap + clipboard definitions
2014-10-16 21:45:47 -04:00
Marc-André Moreau
abd87ace55
rdtk: initial commit
2014-09-29 16:08:08 -04:00
Marc-André Moreau
1c34583407
libwinpr-utils: add png support
2014-09-28 11:02:39 -04:00
Armin Novak
cceb216e2e
Replaced fprintf with WLog_ERR.
2014-09-09 16:35:04 +02:00
Marc-André Moreau
fd7b9669a5
libfreerdp-codec: improve progressive unit tests
2014-09-03 18:47:02 -04:00
Marc-André Moreau
320b1d35ed
libwinpr-utils: centralize bitmap utils
2014-09-03 16:20:50 -04:00