[prev in list] [next in list] [prev in thread] [next in thread]
List: win-pv-devel
Subject: [PATCH] Add annotation to fix SDV failure
From: Owen Smith <owen.smith () citrix ! com>
Date: 2023-01-30 15:03:58
Message-ID: 20230130150358.4076674-1-owen.smith () citrix ! com
[Download RAW message or body]
SDV can detect the BytesNeeded value may be 0, as it cannot determine the value
of some constants.
Signed-off-by: Alex Burke <Alex.Burke@citrix.com>
Signed-off-by: Owen Smith <owen.smith@citrix.com>
---
src/xennet/adapter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c
index 7a083e9..4b449f3 100644
--- a/src/xennet/adapter.c
+++ b/src/xennet/adapter.c
@@ -2130,6 +2130,7 @@ AdapterSetInformation(
break;
case OID_OFFLOAD_ENCAPSULATION:
+ __analysis_assume(BytesNeeded > 0);
BytesNeeded = NDIS_SIZEOF_OFFLOAD_ENCAPSULATION_REVISION_1;
if (BufferLength >= BytesNeeded) {
ndisStatus = AdapterGetOffloadEncapsulation(Adapter,
--
2.39.0.windows.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic