automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw113658 [PATCH] [v3] examples/fips_validation: fix memory leak in sha test
@ 2022-07-04 10:10 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-07-04 10:10 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/113658

_apply patch failure_

Submitter: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Monday, July 04 2022 09:55:03 
Applied on: CommitID:7cac53f205ebd04d8ebd3ee6a9dd84f698d4ada3
Apply patch set 113658 failed:

Checking patch doc/guides/sample_app_ug/fips_validation.rst...
error: while searching for:
    * AES-CMAC (128,192,256) - AFT
    * AES-XTS (128,256) - AFT
    * HMAC (SHA1, SHA224, SHA256, SHA384, SHA512)
    * SHA (1,256) - AFT, MCT


Application Information

error: patch failed: doc/guides/sample_app_ug/fips_validation.rst:63
Checking patch examples/fips_validation/fips_validation_sha.c...
error: while searching for:
	for (i = 0; i < RTE_DIM(phsc); i++) {
		if (info.interim_info.sha_data.algo == phsc[i].algo) {
			vec.cipher_auth.digest.len = atoi(phsc[i].str);
			vec.cipher_auth.digest.val = calloc(0, vec.cipher_auth.digest.len * 8);
			break;
		}
	}

	if (i == RTE_DIM(phsc))
		return -1;

	return 0;
}

error: patch failed: examples/fips_validation/fips_validation_sha.c:229
Checking patch examples/fips_validation/main.c...
Hunk #1 succeeded at 2077 (offset -22 lines).
Applying patch doc/guides/sample_app_ug/fips_validation.rst with 1 reject...
Rejected hunk #1.
Applying patch examples/fips_validation/fips_validation_sha.c with 1 reject...
Rejected hunk #1.
Applied patch examples/fips_validation/main.c cleanly.
diff a/doc/guides/sample_app_ug/fips_validation.rst b/doc/guides/sample_app_ug/fips_validation.rst	(rejected hunks)
@@ -63,7 +63,7 @@ ACVP
     * AES-CMAC (128,192,256) - AFT
     * AES-XTS (128,256) - AFT
     * HMAC (SHA1, SHA224, SHA256, SHA384, SHA512)
-    * SHA (1,256) - AFT, MCT
+    * SHA (1, 256, 384, 512) - AFT, MCT
 
 
 Application Information
diff a/examples/fips_validation/fips_validation_sha.c b/examples/fips_validation/fips_validation_sha.c	(rejected hunks)
@@ -229,13 +229,20 @@ parse_test_sha_json_algorithm(void)
 	for (i = 0; i < RTE_DIM(phsc); i++) {
 		if (info.interim_info.sha_data.algo == phsc[i].algo) {
 			vec.cipher_auth.digest.len = atoi(phsc[i].str);
-			vec.cipher_auth.digest.val = calloc(0, vec.cipher_auth.digest.len * 8);
+			free(vec.cipher_auth.digest.val);
+			vec.cipher_auth.digest.val = calloc(1, vec.cipher_auth.digest.len);
+			if (vec.cipher_auth.digest.val == NULL)
+				return -1;
+
 			break;
 		}
 	}
 
-	if (i == RTE_DIM(phsc))
+	if (i == RTE_DIM(phsc)) {
+		free(vec.cipher_auth.digest.val);
+		vec.cipher_auth.digest.val = NULL;
 		return -1;
+	}
 
 	return 0;
 }

https://lab.dpdk.org/results/dashboard/patchsets/22901/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-04 10:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 10:10 |WARNING| pw113658 [PATCH] [v3] examples/fips_validation: fix memory leak in sha test dpdklab

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).