From: Owen Smith Date: Mon, 30 Jan 2023 15:03:58 +0000 (+0000) Subject: Add annotation to fix SDV failure X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0a9af5c1dbd2f1cf80b560ed06fd89bd5d84185c;p=pvdrivers%2Fwin%2Fxennet.git Add annotation to fix SDV failure SDV can detect the BytesNeeded value may be 0, as it cannot determine the value of some constants. Signed-off-by: Alex Burke Signed-off-by: Owen Smith --- 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,