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

Tom Rini trini at konsulko.com
Thu Dec 3 18:28:39 CET 2020


This latest run also closed a number of open defects (the CIDs of which
are sadly not in the summary).

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

Date: Mon, 30 Nov 2020 18:33:34 +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.

5 new defect(s) introduced to Das U-Boot found with Coverity Scan.
17 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 5 of 5 defect(s)


** CID 313548:  Uninitialized variables  (UNINIT)
/drivers/mmc/mmc.c: 2194 in mmc_select_mode_and_width()


________________________________________________________________________________________________________
*** CID 313548:  Uninitialized variables  (UNINIT)
/drivers/mmc/mmc.c: 2194 in mmc_select_mode_and_width()
2188     				   EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_1);
2189     			mmc_select_mode(mmc, MMC_LEGACY);
2190     			mmc_set_bus_width(mmc, 1);
2191     		}
2192     	}
2193     
>>>     CID 313548:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "err" when calling "printf".
2194     	pr_err("unable to select a mode : %d\n", err);
2195     
2196     	return -ENOTSUPP;
2197     }
2198     #endif
2199     

** CID 313547:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 953 in sqfs_opendir()


________________________________________________________________________________________________________
*** CID 313547:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 953 in sqfs_opendir()
947     	dirs->table += SQFS_DIR_HEADER_SIZE;
948     
949     	*dirsp = (struct fs_dir_stream *)dirs;
950     
951     out:
952     	for (j = 0; j < token_count; j++)
>>>     CID 313547:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "token_list".
953     		free(token_list[j]);
954     	free(token_list);
955     	free(pos_list);
956     	free(path);
957     	if (ret) {
958     		free(inode_table);

** CID 313546:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 1605 in sqfs_size()


________________________________________________________________________________________________________
*** CID 313546:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 1605 in sqfs_size()
1599     		printf("File not found.\n");
1600     		*size = 0;
1601     		ret = -EINVAL;
1602     		goto free_strings;
1603     	}
1604     
>>>     CID 313546:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "dirs->entry".
1605     	i_number = dirs->dir_header->inode_number + dirs->entry->inode_offset;
1606     	ipos = sqfs_find_inode(dirs->inode_table, i_number, sblk->inodes,
1607     			       sblk->block_size);
1608     	free(dirs->entry);
1609     	dirs->entry = NULL;
1610     

** CID 313545:    (FORWARD_NULL)
/fs/squashfs/sqfs.c: 516 in sqfs_search_dir()
/fs/squashfs/sqfs.c: 516 in sqfs_search_dir()


________________________________________________________________________________________________________
*** CID 313545:    (FORWARD_NULL)
/fs/squashfs/sqfs.c: 516 in sqfs_search_dir()
510     			printf("** Cannot find directory. **\n");
511     			ret = -EINVAL;
512     			goto out;
513     		}
514     
515     		/* Redefine inode as the found token */
>>>     CID 313545:    (FORWARD_NULL)
>>>     Dereferencing null pointer "dirs->entry".
516     		new_inode_number = dirs->entry->inode_offset +
517     			dirs->dir_header->inode_number;
518     
519     		/* Get reference to inode in the inode table */
520     		table = sqfs_find_inode(dirs->inode_table, new_inode_number,
521     					sblk->inodes, sblk->block_size);
/fs/squashfs/sqfs.c: 516 in sqfs_search_dir()
510     			printf("** Cannot find directory. **\n");
511     			ret = -EINVAL;
512     			goto out;
513     		}
514     
515     		/* Redefine inode as the found token */
>>>     CID 313545:    (FORWARD_NULL)
>>>     Dereferencing null pointer "dirs->entry".
516     		new_inode_number = dirs->entry->inode_offset +
517     			dirs->dir_header->inode_number;
518     
519     		/* Get reference to inode in the inode table */
520     		table = sqfs_find_inode(dirs->inode_table, new_inode_number,
521     					sblk->inodes, sblk->block_size);

** CID 313544:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 1366 in sqfs_read()


________________________________________________________________________________________________________
*** CID 313544:  Null pointer dereferences  (FORWARD_NULL)
/fs/squashfs/sqfs.c: 1366 in sqfs_read()
1360     		printf("File not found.\n");
1361     		*actread = 0;
1362     		ret = -ENOENT;
1363     		goto out;
1364     	}
1365     
>>>     CID 313544:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "dirs->entry".
1366     	i_number = dirs->dir_header->inode_number + dirs->entry->inode_offset;
1367     	ipos = sqfs_find_inode(dirs->inode_table, i_number, sblk->inodes,
1368     			       sblk->block_size);
1369     
1370     	base = (struct squashfs_base_inode *)ipos;
1371     	switch (get_unaligned_le16(&base->inode_type)) {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DZs-v_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtN3JxLp2B5CSsxorhm8wtmLedkiPv9kYejlqgrLobigk7QzKCLISKHxGU6zVV33iYV78tUEiPh5Ztuf69acmElPECtqYXfGpV6b65zwVBCWUkOdU-2FFhvPGbHv2RyJAEnx6WQlg467Tgn7Pa8uHzDtH4S-2FI9gFsM6OsQ8ct1T7Ovl-2FJvkc1s3u7lPACBdbfIOo-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-3DSCgH_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTtN3JxLp2B5CSsxorhm8wtm-2BYdI9RyIF9jeDtnXStwhOThFUwHv1h2rtl1Rc-2F3So-2B-2FoVfdIYBRRPrxN8Do-2BHHhwVch1Nm7xBI1HVIWTGmw5XFXcqFyhJ17sm4uZdEqbM-2BgqoOenysxH5k9MFDvKEAN402mvfbkkTtOJJwqeGxrekkiTH43M6bnkpzNozhrl9Ws-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/20201203/4c36d92f/attachment.sig>


More information about the U-Boot mailing list