git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto/ipsec_mb: fix ZUC authentication verify
[dpdk.git]
/
examples
/
fips_validation
/
fips_validation.c
diff --git
a/examples/fips_validation/fips_validation.c
b/examples/fips_validation/fips_validation.c
index
7454a03
..
94253ea
100644
(file)
--- a/
examples/fips_validation/fips_validation.c
+++ b/
examples/fips_validation/fips_validation.c
@@
-118,7
+118,7
@@
fips_test_parse_header(void)
if (info.nb_vec_lines)
fips_test_parse_version();
if (info.nb_vec_lines)
fips_test_parse_version();
- for (i =
1
; i < info.nb_vec_lines; i++) {
+ for (i =
0
; i < info.nb_vec_lines; i++) {
if (!algo_parsed) {
if (strstr(info.vec[i], "AESVS")) {
algo_parsed = 1;
if (!algo_parsed) {
if (strstr(info.vec[i], "AESVS")) {
algo_parsed = 1;
@@
-344,8
+344,7
@@
fips_test_clear(void)
fclose(info.fp_rd);
if (info.fp_wr)
fclose(info.fp_wr);
fclose(info.fp_rd);
if (info.fp_wr)
fclose(info.fp_wr);
- if (info.one_line_text)
- free(info.one_line_text);
+ free(info.one_line_text);
if (info.nb_vec_lines) {
uint32_t i;
if (info.nb_vec_lines) {
uint32_t i;
@@
-650,6
+649,22
@@
parser_read_uint32(uint32_t *value, char *p)
return 0;
}
return 0;
}
+int
+parser_read_uint16(uint16_t *value, const char *p)
+{
+ uint64_t val = 0;
+ int ret = parser_read_uint64(&val, p);
+
+ if (ret < 0)
+ return ret;
+
+ if (val > UINT16_MAX)
+ return -ERANGE;
+
+ *value = val;
+ return 0;
+}
+
void
parse_write_hex_str(struct fips_val *src)
{
void
parse_write_hex_str(struct fips_val *src)
{