[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add annotation to fix SDV failure


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Mon, 30 Jan 2023 15:03:58 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>, Alex Burke <Alex.Burke@xxxxxxxxxx>
  • Delivery-date: Mon, 30 Jan 2023 15:05:41 +0000
  • Ironport-data: A9a23:QUnvDKMbDcnuRFXvrR3Ul8FynXyQoLVcMsEvi/4bfWQNrUoq1mZRy DcXD2uEOvfYYWPxfNonbIm2ph9Uv57dyoUyTwto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9Suv3rRC9H5qyo42tB5QRmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0txMDnFqq 6UUETsiR1ParcSszICwF9A506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo5g+quwGL6ciFYgFmUubA28y7YywkZPL3FYYGKI4PVHZg9ckCwg HOdpknhCBEgO+fPxjmIqV6jn7LoknauMG4VPOLhraM76LGJ/UQMCRtTTUX+rfSnh0qWX9NEN 1dS6icotbI19kGgUp/6RRLQnZKflkdCAZwKSbR8sVzTjPOOuG51G1ToUBZ7U9M2kJFvSQUh+ XbKxvnPHzBdu+CsHCf1GqivkRu+Pi0cLGknbCACTBcY79SLnLzfni4jXf44Tvfr04Sd9SXYh mnT8XNg3+l7Ydsjjf3TwLzRv967SnElpCYR7x6fYG+q5xgRiGWNN93xsgizARqtwe+kori9U JoswZP2AAMmV8vleMmxrAIlQdmUCw6tamG0vLKWN8BJG86R03CiZ5tMxzp1OV1kNM0JERewP hCO4VoOvc8PZCr1BUOSX25WI516pZUM6Py/DqyEBjawSscZmPC7ENFGOhfLgjGFfLkEmqAjI 5aLGftA/l5DYZmLOAGeHr9HuZdyn3BW+I8mbcyjp/hR+ebENSH9pHZsGAfmU93VG4vf/lmKo oYDZ5Lao/idOcWnChTqHUcoBQhiBRAG6Vre95YOHgJfCmKKwF0cNsI=
  • Ironport-hdrordr: A9a23:2m727a/rNLamxffz9GVuk+DiI+orL9Y04lQ7vn2ZKCY4TiX8ra uTdZsguiMc5Ax+ZJhYo6HnBEDjexPhHO9OgLX5VI3KNGOKhILCFvAA0WKN+UyFJwTOssJbyK d8Y+xfJbTLfD9HZB/BkWuF+gAbsby6zJw=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

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@xxxxxxxxxx>
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.