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

Tom Rini trini at konsulko.com
Tue Mar 2 15:42:02 CET 2021


Here's the new issues from the last time I ran Coverity.

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

Date: Tue, 02 Mar 2021 13:31:05 +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.
3 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 325866:  Error handling issues  (CHECKED_RETURN)
/drivers/core/ofnode.c: 77 in ofnode_read_s32_default()


________________________________________________________________________________________________________
*** CID 325866:  Error handling issues  (CHECKED_RETURN)
/drivers/core/ofnode.c: 77 in ofnode_read_s32_default()
71     	return def;
72     }
73     
74     int ofnode_read_s32_default(ofnode node, const char *propname, s32 def)
75     {
76     	assert(ofnode_valid(node));
>>>     CID 325866:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "ofnode_read_u32" without checking return value (as is done elsewhere 14 out of 17 times).
77     	ofnode_read_u32(node, propname, (u32 *)&def);
78     
79     	return def;
80     }
81     
82     int ofnode_read_u64(ofnode node, const char *propname, u64 *outp)

** CID 325865:  Memory - illegal accesses  (BUFFER_SIZE_WARNING)
/drivers/fastboot/fb_mmc.c: 64 in raw_part_get_info_by_name()


________________________________________________________________________________________________________
*** CID 325865:  Memory - illegal accesses  (BUFFER_SIZE_WARNING)
/drivers/fastboot/fb_mmc.c: 64 in raw_part_get_info_by_name()
58     		}
59     	}
60     
61     	info->start = simple_strtoul(argv[0], NULL, 0);
62     	info->size = simple_strtoul(argv[1], NULL, 0);
63     	info->blksz = dev_desc->blksz;
>>>     CID 325865:  Memory - illegal accesses  (BUFFER_SIZE_WARNING)
>>>     Calling "strncpy" with a maximum size argument of 32 bytes on destination array "info->name" of size 32 bytes might leave the destination string unterminated.
64     	strncpy((char *)info->name, name, PART_NAME_LEN);
65     
66     	if (raw_part_desc) {
67     		if (strcmp(strsep(&raw_part_desc, " "), "mmcpart") == 0) {
68     			ulong mmcpart = simple_strtoul(raw_part_desc, NULL, 0);
69     			int ret = blk_dselect_hwpart(dev_desc, mmcpart);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DFzp4_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTv98pi1c8uIeqB-2F-2BFPUzcYfoG-2Bd8nhM2Fv5oFkq75-2BxXz7QGOLwRlCO953bEVYICeg2vVIyq8wQ3LaizUFiBfjBG-2BWhQ090GAOOTZ3lBXzN-2FWpp4MyKZ4n2ZP-2B3vGoAx2pKXpTw1dEZn1a7OJG4qmBCwvuSQI-2FiEHFLEFNwQEkCS2bixUdLckzdntWX0AN5f6o-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-3DH-YO_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTv98pi1c8uIeqB-2F-2BFPUzcYfVUSll4t2sRO5wsZnPOmmof4GOvk2w6ODLcJ3IaX17q78kitYrmOJJ8VFbT-2BNDNk8I23CTJCXl3U7RBskWtLaNdcHyH-2BGFsz88rbIyrFvYuNFT0POy5JGKBhENFhh-2FUKYhbX1ZRSCbtzlhx6TQJc5rC2UTl5lvExmP-2FpY5LE5VNA-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/20210302/5b2b83d6/attachment.sig>


More information about the U-Boot mailing list