[scan-admin at coverity.com: New Defects reported by Coverity Scan for Das U-Boot]

Tom Rini trini at konsulko.com
Tue Feb 15 20:29:49 CET 2022


Hey all,

Here's the latest report.

----- Forwarded message from scan-admin at coverity.com -----

Date: Mon, 14 Feb 2022 22:13:51 +0000 (UTC)
From: scan-admin at coverity.com
To: tom.rini at gmail.com
Subject: New Defects reported by Coverity Scan for Das U-Boot

Hi,

Please find the latest report on new defect(s) introduced to Das U-Boot found with Coverity Scan.

2 new defect(s) introduced to Das U-Boot found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 348361:  Code maintainability issues  (SIZEOF_MISMATCH)
/boot/pxe_utils.c: 369 in label_boot_kaslrseed()


________________________________________________________________________________________________________
*** CID 348361:  Code maintainability issues  (SIZEOF_MISMATCH)
/boot/pxe_utils.c: 369 in label_boot_kaslrseed()
363     
364     	if (dm_rng_read(dev, buf, n)) {
365     		printf("Reading RNG failed\n");
366     		goto err;
367     	}
368     
>>>     CID 348361:  Code maintainability issues  (SIZEOF_MISMATCH)
>>>     Passing argument "buf" of type "u64 *" and argument "8 /* sizeof (buf) */" to function "fdt_setprop" is suspicious. In this case, "sizeof (u64 *)" is equal to "sizeof (u64)", but this is not a portable assumption.
369     	err = fdt_setprop(working_fdt, nodeoffset, "kaslr-seed", buf, sizeof(buf));
370     	if (err < 0) {
371     		printf("Unable to set kaslr-seed on chosen node: %s\n", fdt_strerror(err));
372     		goto err;
373     	}
374     err:

** CID 348360:  Control flow issues  (DEADCODE)
/tools/mkeficapsule.c: 216 in create_auth_data()


________________________________________________________________________________________________________
*** CID 348360:  Control flow issues  (DEADCODE)
/tools/mkeficapsule.c: 216 in create_auth_data()
210     	cert.size = file_size;
211     
212     	ret = read_bin_file(ctx->key_file, &key.data, &file_size);
213     	if (ret < 0)
214     		return -1;
215     	if (ret < 0)
>>>     CID 348360:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return -1;".
216     		return -1;
217     	if (file_size > UINT_MAX)
218     		return -1;
219     	key.size = file_size;
220     
221     	/*


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DzatU_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtBG6gUqymbLeHiLUZdYE-2BnFbf8zeujozu1RicmnClG68TkQz5O-2BGjs-2FiSUi9SbNlD0ZKYuwGCOtzzhPrzmz3aE-2FGoy8IfPEIkNIW63Gi9NpdMUS9Ikumb8oIFeDys4nJ5vGaorBAY9O9ON-2BXS4h6-2FgOrRT3qYLv0G399O590I1aQ-3D-3D

  To manage Coverity Scan email notifications for "tom.rini at gmail.com", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxWeIHzDeopm-2BEWQ6S6K-2FtUHv9ZTk8qZbuzkkz9sa-2BJFw4elYDyedRVZOC-2ButxjBZdouVmTGuWB6Aj6G7lm7t25-2Biv1B-2B9082pHzCCex2kqMs-3D4FDW_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtBG6gUqymbLeHiLUZdYE-2BnFhYoNq9mQGL-2FVdQFZIqeIZwliLES0HECBswlH590ugIExPr3PyN1Y4w0WO5KtHGXAw8STt9dOWWhzHpyUYpWpEhXNMVJaJpaycREp8UUQddEItpr1JHWiHxEXRzVxzJv5pVvnvWo1MNlxWMr7wY67Q-3D-3D


----- End forwarded message -----

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220215/95ef87a4/attachment.sig>


More information about the U-Boot mailing list