Commit Graph

4499 Commits

Author SHA1 Message Date
dmex f84c35315d Use HRESULT macros to check Win32 errors
Replace manual bitmasking of the HRESULT with HRESULT_FACILITY() and HRESULT_SEVERITY() . This makes the Win32 error check clearer and uses standard macros for determining FACILITY_WIN32 and SEVERITY_ERROR while preserving the original behavior.
2026-04-03 23:27:30 +11:00
dmex 24a19924a6 Fix JSON escaping and number formatting in phlib/json.c
Replace sprintf_s-based Unicode escaping with a manual construction of the "\u00xx" sequence using lowercase hex digits and an explicit ANSI_NULL terminator, and fix the appended byte length to 6. Adjust string length handling for formatted buffers to use the actual return length (not subtracting the null). Consolidate integer formatting to use PhIntegerToUtf8Buffer and append its result directly, removing older fallback/unused code. Also remove a redundant double-formatting fallback, simplifying the JSON serialization path and avoiding sprintf_s where possible.
2026-04-03 05:29:27 +11:00
dmex 006ec02af6 Improve address/overflow checks in phsup.h
Compute explicit start/end addresses for user and buffer ranges and add proper wrap/overflow checks to prevent integer wraparound and access violations. Replace MAXULONG_PTR and (ULONG_PTR)-PAGE_SIZE uses with ULONG_PTR_MAX-based comparison. Use PAGE_ALIGN + PAGE_SIZE to advance page pointers and normalize volatile dereference syntax for readability. These changes tighten bounds checking in PhProbeAddress/PhProbeForRead/PhProbeForWrite to avoid subtle failures on pointer wraparound.
2026-04-03 05:28:25 +11:00
dmex 0a24e75136 Enable column sorting memory search 2026-04-01 12:37:42 +11:00
dmex 34016e27d9 Apply SAL annotations fixes and add annotations 2026-04-01 12:11:37 +11:00
dmex 34c51e5a7a Add PhEnumDesktops 2026-03-31 12:20:47 +11:00
dmex 8eae70353b Trim trailing whitespace in basestring.c 2026-03-31 12:19:10 +11:00
dmex 6aa8be86a2 Fix WCHAR buffer size/length
Treat returnLength as a WCHAR count instead of bytes: compute it from time/date buffer sizes, compare BufferLength after converting to bytes, and return the output length in bytes. Replace the previous sizeof(UNICODE_NULL) hack with (returnLength - 1) * sizeof(WCHAR). On failure, set *ReturnLength to 0. These changes correct off-bytes/termination size handling when formatting date/time into the buffer.
2026-03-31 10:01:15 +11:00
dmex ca41d4296b Update nativeobject.c 2026-03-30 09:02:22 +11:00
dmex 12d1f44dd3 Fix PhCreateBoundaryDescriptor validation 2026-03-30 04:20:30 +11:00
dmex 6d6918c4e0 Make GUID params const and inline DevFindProperty 2026-03-29 05:24:08 +11:00
dmex 3aba8b5563 Update WaitableTimer wrappers 2026-03-29 03:17:49 +11:00
dmex ff686506c3 Update phbasesup.h 2026-03-29 03:16:26 +11:00
dmex fa239e8ee6 Update format_std.cpp 2026-03-29 03:15:57 +11:00
dmex 7458f92727 Update phsup.h 2026-03-29 03:15:37 +11:00
Johnny Shaw 25b6d0ae3d phsup fix probing functions 2026-03-26 22:21:30 -06:00
Johnny Shaw 877e5428f5 kphuser restore back trace api 2026-03-26 16:51:02 -06:00
dmex d877b9c30c Add PhSetExpandKeyString 2026-03-25 05:36:17 +11:00
dmex 98032e6a56 Add selection bitmap caching 2026-03-25 05:35:06 +11:00
dmex 7d0e64642b Move PhOpenDirectoryObject, PhEnumDirectoryObject 2026-03-25 01:30:17 +11:00
dmex 6c77c880f0 Rename GuardAdressIat -> GuardAddressIat 2026-03-25 01:24:19 +11:00
dmex ec73cb1f4e Add PhCreateImagingFactory 2026-03-25 01:23:46 +11:00
dmex 4f6c9ad5c9 Remove casts 2026-03-25 01:22:52 +11:00
dmex 86eb860374 Update mapimg.h 2026-03-22 15:33:12 +11:00
dmex 7b228d512f Update apiimport.c 2026-03-22 15:32:27 +11:00
dmex d54727c4c6 Update settings.c 2026-03-22 12:24:48 +11:00
dmex 2e768b6c94 Update apiimport.h 2026-03-22 12:24:31 +11:00
dmex 430ad1c037 Update mapimg.h 2026-03-22 12:15:13 +11:00
dmex e3ac9ab61d Update native.c 2026-03-22 12:14:33 +11:00
dmex 6ed526240d Update settings.c 2026-03-22 12:01:28 +11:00
dmex dabb8cca64 Update mapldr.h 2026-03-22 12:01:16 +11:00
dmex f0dc2a1e92 Update mapldr.c 2026-03-22 12:01:14 +11:00
dmex af78d92c9b Update phnative.h 2026-03-22 11:57:35 +11:00
dmex 45ede39fcd Update native.c 2026-03-22 11:56:09 +11:00
dmex bae2ca3b41 Update comments and tidy up 2026-03-22 11:31:16 +11:00
Johnny Shaw b425a8c9f0 kphuser disable back trace api 2026-03-20 21:06:03 -06:00
Johnny Shaw 3d27bc0c43 Rename PhReferenceObjectSafe to Unsafe 2026-03-20 17:40:54 -06:00
mozhucy 0d2893cc89 Handle null service config path names (#2853) 2026-03-20 16:55:51 +11:00
Johnny Shaw 34e10ffafd kph raise comms priority 2026-03-13 22:44:03 -06:00
Johnny Shaw ed8ee7c7cf kph increase message size 2026-03-13 22:44:02 -06:00
Johnny Shaw 2b88509945 kph client informer state 2026-03-13 22:44:02 -06:00
dmex 1541edcd2e Update appresolver.h 2026-03-14 11:00:45 +11:00
dmex 971bf4b102 Remove unused code 2026-03-13 02:33:54 +11:00
dmex 6956afcf9d Add check for invalid remote environment address 2026-03-07 01:45:26 +11:00
dmex e2faf0618b Cast counters to SIZE_T before subtraction 2026-03-07 01:31:00 +11:00
dmex bdc5c780e5 Update comments, Update LSA wrappers 2026-03-07 01:30:14 +11:00
dmex 0e270a053a Improve parameter name, type-safety, and SAL annotation consistency 2026-03-07 01:24:03 +11:00
dmex 5ba595389b Add workaround for Win32ExtendedPathPrefix to PhDosPathNameToNtPathName 2026-03-04 13:08:31 +11:00
Johnny Shaw cbcad5cd2d provider use normal thread access 2026-03-01 08:07:07 -07:00
dmex 7d8df63937 Limit NtSetTimer2 usage to Windows 11 2026-02-24 06:45:03 +11:00