From: Martin Harvey <mhar...@solarflare.com>

Found by PreFAST warnings.

Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")
Cc: sta...@dpdk.org

Signed-off-by: Martin Harvey <mhar...@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
---
 drivers/net/sfc/base/ef10_image.c | 3 ++-
 drivers/net/sfc/base/efx.h        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_image.c 
b/drivers/net/sfc/base/ef10_image.c
index 0d8898762..c035e0df6 100644
--- a/drivers/net/sfc/base/ef10_image.c
+++ b/drivers/net/sfc/base/ef10_image.c
@@ -577,7 +577,8 @@ efx_check_reflash_image(
 
        __checkReturn   efx_rc_t
 efx_build_signed_image_write_buffer(
-       __out           uint8_t                 *bufferp,
+       __out_bcount(buffer_size)
+                       uint8_t                 *bufferp,
        __in            uint32_t                buffer_size,
        __in            efx_image_info_t        *infop,
        __out           efx_image_header_t      **headerpp)
diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index 5108b9b1f..53cbc9858 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -1689,7 +1689,8 @@ efx_check_reflash_image(
 
 extern __checkReturn   efx_rc_t
 efx_build_signed_image_write_buffer(
-       __out           uint8_t                 *bufferp,
+       __out_bcount(buffer_size)
+                       uint8_t                 *bufferp,
        __in            uint32_t                buffer_size,
        __in            efx_image_info_t        *infop,
        __out           efx_image_header_t      **headerpp);
-- 
2.17.1

Reply via email to