From: Brian Dooley <brian.dooley@intel.com>
To: Brian Dooley <brian.dooley@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org, gakhil@marvell.com
Subject: [PATCH v1] examples/fips_validation: fix IV generation for gmac
Date: Wed, 2 Nov 2022 12:01:17 +0000 [thread overview]
Message-ID: <20221102120117.381696-1-brian.dooley@intel.com> (raw)
Replace rand() call in fips validation example with rte_rand().
Coverity issue: 381668
Fixes: e27268bd2103 ("examples/fips_validation: add parsing for AES-GMAC")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
examples/fips_validation/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 40a5b70e07..404a29d7b6 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -12,6 +12,7 @@
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_string_fns.h>
+#include <rte_random.h>
#include "fips_validation.h"
#include "fips_dev_self_test.h"
@@ -761,7 +762,7 @@ prepare_auth_op(void)
}
for (i = 0; i < vec.iv.len; i++) {
- int random = rand();
+ int random = rte_rand();
vec.iv.val[i] = (uint8_t)random;
}
}
--
2.25.1
next reply other threads:[~2022-11-02 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 12:01 Brian Dooley [this message]
2022-11-03 11:22 ` [EXT] " Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221102120117.381696-1-brian.dooley@intel.com \
--to=brian.dooley@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).