Skip to contentSkip to conversation

[[email protected]: New Defects reported by Coverity Scan for Das U-Boot]

[email protected]: New Defects reported by Coverity Scan for Das U-Boot Tom Rini 2 participants 2 messages May 12, 2021 – May 13, 2021

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

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

Date: Mon, 10 May 2021 21:17:32 +0000 (UTC)
From: [email protected]
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.

1 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 1 of 1 defect(s)

** CID 331544: Null pointer dereferences (REVERSE_INULL) /drivers/core/ofnode.c: 317 in ofnode_get_addr_size_index()

________________________________________________________________________________________________________
*** CID 331544: Null pointer dereferences (REVERSE_INULL) /drivers/core/ofnode.c: 317 in ofnode_get_addr_size_index()
311 uint flags;
312

313     		prop_val = of_get_address(ofnode_to_np(node), index, &size64,
314     					  &flags);
315     		if (!prop_val)
316     			return FDT_ADDR_T_NONE;
>>>     CID 331544:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
317     		if (size)
318     			*size = size64;

319
320 ns = of_n_size_cells(ofnode_to_np(node));
321
322 if (IS_ENABLED(CONFIG_OF_TRANSLATE) &&

________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DG8yI_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtU1-2Brl29AQnRBl5SDIhsdlk4JL-2BC60Yy99Ru0XHXKZmudWSFasqNbw3J8c8YsieibEgnFne8AQZsraqyZc6bSorO2VVj4yo2EYbDylqVK-2BNvmB4zxqglhPpQGYCxEyim-2BCmtR1oyAQcyUT-2F0UpwA2s3mUEbsptAVDqX6MTucjWlw-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-3DcN-g_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtU1-2Brl29AQnRBl5SDIhsdlpXdtm0ziQZhCdYNwPtYo9juOCfJRYvUSD6RBDul3PpPJtEbQAvJyD64um9NlavMb-2FNhtaCPCgg1OZOg6fyHdjqmNc-2BSac4T2ShWFTENHS5073Orso2HRCvi56uwUJuZ8ILMBdsEOC5-2FtuCAU-2BmbVBQ-3D-3D

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

Signature · 8 lines
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/20210512/12943f8a/attachment.sig>
#1 lore raw

Re: 【外部邮件!】[[email protected]: New Defects reported by Coverity Scan for Das U-Boot]

Hi

Sorry, A null pointer detection is missing here, I will fix it later.

On May 13, 2021, at 6:30 AM, Tom Rini <trini at konsulko.com<mailto:[email protected]>> wrote:

----- Forwarded message from scan-admin at coverity.com<mailto:[email protected]> -----

Date: Mon, 10 May 2021 21:17:32 +0000 (UTC)
From: [email protected]<mailto:[email protected]>
To: tom.rini at gmail.com<mailto:[email protected]>
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.

1 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 1 of 1 defect(s)

** CID 331544: Null pointer dereferences (REVERSE_INULL) /drivers/core/ofnode.c: 317 in ofnode_get_addr_size_index()

________________________________________________________________________________________________________
*** CID 331544: Null pointer dereferences (REVERSE_INULL)
/drivers/core/ofnode.c: 317 in ofnode_get_addr_size_index()
311 uint flags;
312
313 prop_val = of_get_address(ofnode_to_np(node), index, &size64,
314 &flags);
315 if (!prop_val)
316 return FDT_ADDR_T_NONE;
CID 331544: Null pointer dereferences (REVERSE_INULL)
Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
317 if (size)
318 *size = size64;
319
320 ns = of_n_size_cells(ofnode_to_np(node));
321
322 if (IS_ENABLED(CONFIG_OF_TRANSLATE) &&

________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DG8yI_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtU1-2Brl29AQnRBl5SDIhsdlk4JL-2BC60Yy99Ru0XHXKZmudWSFasqNbw3J8c8YsieibEgnFne8AQZsraqyZc6bSorO2VVj4yo2EYbDylqVK-2BNvmB4zxqglhPpQGYCxEyim-2BCmtR1oyAQcyUT-2F0UpwA2s3mUEbsptAVDqX6MTucjWlw-3D-3D

To manage Coverity Scan email notifications for "tom.rini at gmail.com<mailto:[email protected]>", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxWeIHzDeopm-2BEWQ6S6K-2FtUHv9ZTk8qZbuzkkz9sa-2BJFw4elYDyedRVZOC-2ButxjBZdouVmTGuWB6Aj6G7lm7t25-2Biv1B-2B9082pHzCCex2kqMs-3DcN-g_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtU1-2Brl29AQnRBl5SDIhsdlpXdtm0ziQZhCdYNwPtYo9juOCfJRYvUSD6RBDul3PpPJtEbQAvJyD64um9NlavMb-2FNhtaCPCgg1OZOg6fyHdjqmNc-2BSac4T2ShWFTENHS5073Orso2HRCvi56uwUJuZ8ILMBdsEOC5-2FtuCAU-2BmbVBQ-3D-3D

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

?
Tom

--
Chen Guanqiao