From 3692857ffc45bac0935520cdf5861c702f8a37de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Sun, 2 Jul 2023 18:20:57 +0200 Subject: [PATCH] Added SAL remark --- README.md | 2 ++ include/Domito.h | 2 +- src/Domito.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d178d5..1e23999 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ Built for and tested on **Windows 10 version 1507 (or newer) x64/ARM64**. 32-Bit - APIs not available on older builds will give you a `STATUS_NOT_IMPLEMENTED` instead of hard-linking and therefore making your driver fail to load 🤞 - No conflicts with WDF or DMF - The consuming driver *may* (but doesn't have to) utilize Microsoft WDF or DMF in addition without having to fear any incompatibilities 💪 +- Reliable SAL annotations. + - I made sure to enrich the majority of the code with correct, tested annotations for Code Analysis to help you spot potential accidental API misuse 😎 ## How to use diff --git a/include/Domito.h b/include/Domito.h index 14232f2..da79dda 100644 --- a/include/Domito.h +++ b/include/Domito.h @@ -221,7 +221,7 @@ DomitoCalculatePortableExecutableDigest( _Out_ PUINT32 pDigestCalgOut, _Out_ PULONG pDigestSizeOut, _Out_ PVOID* pDigestOut, - _Out_ LPWIN_CERTIFICATE* pCertOut, + _Outptr_result_maybenull_ LPWIN_CERTIFICATE* pCertOut, _Out_ PULONG pSizeOfSecurityDirectory ); diff --git a/src/Domito.cpp b/src/Domito.cpp index b62b6d2..7cf0eab 100644 --- a/src/Domito.cpp +++ b/src/Domito.cpp @@ -463,7 +463,7 @@ DomitoCalculatePortableExecutableDigest( _Out_ PUINT32 pDigestCalgOut, _Out_ PULONG pDigestSizeOut, _Out_ PVOID * pDigestOut, - _Out_ LPWIN_CERTIFICATE * pCertOut, + _Outptr_result_maybenull_ LPWIN_CERTIFICATE * pCertOut, _Out_ PULONG pSizeOfSecurityDirectory ) {