Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
47 new defect(s) introduced to coreboot found with Coverity Scan. 353 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 20 of 47 defect(s)
** CID 1323498: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 194 in t114_get_sdram_param()
________________________________________________________________________________________________________ *** CID 1323498: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 194 in t114_get_sdram_param() 188 u_int32_t *value) 189 { 190 nvboot_sdram_params *params; 191 nvboot_config_table *bct = NULL; 192 193 bct = (nvboot_config_table *)(context->bct);
CID 1323498: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
194 assert(context != NULL); 195 assert(bct != NULL); 196 params = &(bct->sdram_params[index]); 197 198 switch (token) { 199 CASE_GET_SDRAM_PARAM(memory_type);
** CID 1323497: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 1091 in t114_init_bad_block_table()
________________________________________________________________________________________________________ *** CID 1323497: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 1091 in t114_init_bad_block_table() 1085 u_int32_t bytes_per_entry; 1086 nvboot_badblock_table *table; 1087 nvboot_config_table *bct; 1088 1089 bct = (nvboot_config_table *)(context->bct); 1090
CID 1323497: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1091 assert(context != NULL); 1092 assert(bct != NULL); 1093 1094 table = &bct->badblock_table; 1095 1096 bytes_per_entry = ICEIL(context->partition_size,
** CID 1323496: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 123 in t114_set_dev_param()
________________________________________________________________________________________________________ *** CID 1323496: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 123 in t114_set_dev_param() 117 parse_token token, 118 u_int32_t value) 119 { 120 nvboot_config_table *bct = NULL; 121 122 bct = (nvboot_config_table *)(context->bct);
CID 1323496: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
123 assert(context != NULL); 124 assert(bct != NULL); 125 126 bct->num_param_sets = NV_MAX(bct->num_param_sets, index + 1); 127 128 switch (token) {
** CID 1323495: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 525 in t114_set_sdram_param()
________________________________________________________________________________________________________ *** CID 1323495: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t114/nvbctlib_t114.c: 525 in t114_set_sdram_param() 519 u_int32_t value) 520 { 521 nvboot_sdram_params *params; 522 nvboot_config_table *bct = NULL; 523 524 bct = (nvboot_config_table *)(context->bct);
CID 1323495: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
525 assert(context != NULL); 526 assert(bct != NULL); 527 params = &(bct->sdram_params[index]); 528 /* Update the number of SDRAM parameter sets. */ 529 bct->num_sdram_sets = NV_MAX(bct->num_sdram_sets, index + 1); 530
** CID 1323494: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 174 in t30_get_dev_param()
________________________________________________________________________________________________________ *** CID 1323494: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 174 in t30_get_dev_param() 168 parse_token token, 169 u_int32_t *value) 170 { 171 nvboot_config_table *bct = NULL; 172 173 bct = (nvboot_config_table *)(context->bct);
CID 1323494: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
174 assert(context != NULL); 175 assert(bct != NULL); 176 177 switch (token) { 178 CASE_GET_DEV_PARAM(nand, clock_divider); 179 CASE_GET_DEV_PARAM(nand, block_size_log2);
** CID 1323493: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 224 in t30_get_sdram_param()
________________________________________________________________________________________________________ *** CID 1323493: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 224 in t30_get_sdram_param() 218 u_int32_t *value) 219 { 220 nvboot_sdram_params *params; 221 nvboot_config_table *bct = NULL; 222 223 bct = (nvboot_config_table *)(context->bct);
CID 1323493: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
224 assert(context != NULL); 225 assert(bct != NULL); 226 params = &(bct->sdram_params[index]); 227 228 switch (token) { 229 CASE_GET_SDRAM_PARAM(memory_type);
** CID 1323492: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 879 in t30_init_bad_block_table()
________________________________________________________________________________________________________ *** CID 1323492: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 879 in t30_init_bad_block_table() 873 u_int32_t bytes_per_entry; 874 nvboot_badblock_table *table; 875 nvboot_config_table *bct; 876 877 bct = (nvboot_config_table *)(context->bct); 878
CID 1323492: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
879 assert(context != NULL); 880 assert(bct != NULL); 881 882 table = &bct->badblock_table; 883 884 bytes_per_entry = ICEIL(context->partition_size,
** CID 1323491: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 123 in t30_set_dev_param()
________________________________________________________________________________________________________ *** CID 1323491: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 123 in t30_set_dev_param() 117 parse_token token, 118 u_int32_t value) 119 { 120 nvboot_config_table *bct = NULL; 121 122 bct = (nvboot_config_table *)(context->bct);
CID 1323491: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
123 assert(context != NULL); 124 assert(bct != NULL); 125 126 bct->num_param_sets = NV_MAX(bct->num_param_sets, index + 1); 127 128 switch (token) {
** CID 1323490: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 438 in t30_set_sdram_param()
________________________________________________________________________________________________________ *** CID 1323490: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t30/nvbctlib_t30.c: 438 in t30_set_sdram_param() 432 u_int32_t value) 433 { 434 nvboot_sdram_params *params; 435 nvboot_config_table *bct = NULL; 436 437 bct = (nvboot_config_table *)(context->bct);
CID 1323490: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
438 assert(context != NULL); 439 assert(bct != NULL); 440 params = &(bct->sdram_params[index]); 441 /* Update the number of SDRAM parameter sets. */ 442 bct->num_sdram_sets = NV_MAX(bct->num_sdram_sets, index + 1); 443
** CID 1323489: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 163 in t20_get_dev_param()
________________________________________________________________________________________________________ *** CID 1323489: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 163 in t20_get_dev_param() 157 parse_token token, 158 u_int32_t *value) 159 { 160 nvboot_config_table *bct = NULL; 161 162 bct = (nvboot_config_table *)(context->bct);
CID 1323489: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
163 assert(context != NULL); 164 assert(bct != NULL); 165 166 switch (token) { 167 CASE_GET_DEV_PARAM(nand, clock_divider); 168 CASE_GET_DEV_PARAM(nand, nand_timing);
** CID 1323488: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 326 in t20_get_sdram_param()
________________________________________________________________________________________________________ *** CID 1323488: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 326 in t20_get_sdram_param() 320 u_int32_t *value) 321 { 322 nvboot_sdram_params *params; 323 nvboot_config_table *bct = NULL; 324 325 bct = (nvboot_config_table *)(context->bct);
CID 1323488: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
326 assert(context != NULL); 327 assert(bct != NULL); 328 params = &(bct->sdram_params[index]); 329 330 switch (token) { 331 CASE_GET_SDRAM_PARAM(memory_type);
** CID 1323487: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 672 in t20_init_bad_block_table()
________________________________________________________________________________________________________ *** CID 1323487: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 672 in t20_init_bad_block_table() 666 u_int32_t bytes_per_entry; 667 nvboot_badblock_table *table; 668 nvboot_config_table *bct; 669 670 bct = (nvboot_config_table *)(context->bct); 671
CID 1323487: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
672 assert(context != NULL); 673 assert(bct != NULL); 674 675 table = &bct->badblock_table; 676 677 bytes_per_entry = ICEIL(context->partition_size,
** CID 1323486: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 123 in t20_set_dev_param()
________________________________________________________________________________________________________ *** CID 1323486: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 123 in t20_set_dev_param() 117 parse_token token, 118 u_int32_t value) 119 { 120 nvboot_config_table *bct = NULL; 121 122 bct = (nvboot_config_table *)(context->bct);
CID 1323486: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
123 assert(context != NULL); 124 assert(bct != NULL); 125 126 bct->num_param_sets = NV_MAX(bct->num_param_sets, index + 1); 127 128 switch (token) {
** CID 1323485: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 202 in t20_set_sdram_param()
________________________________________________________________________________________________________ *** CID 1323485: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t20/nvbctlib_t20.c: 202 in t20_set_sdram_param() 196 u_int32_t value) 197 { 198 nvboot_sdram_params *params; 199 nvboot_config_table *bct = NULL; 200 201 bct = (nvboot_config_table *)(context->bct);
CID 1323485: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
202 assert(context != NULL); 203 assert(bct != NULL); 204 params = &(bct->sdram_params[index]); 205 /* Update the number of SDRAM parameter sets. */ 206 bct->num_sdram_sets = NV_MAX(bct->num_sdram_sets, index + 1); 207
** CID 1323484: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 164 in t124_get_dev_param()
________________________________________________________________________________________________________ *** CID 1323484: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 164 in t124_get_dev_param() 158 parse_token token, 159 u_int32_t *value) 160 { 161 nvboot_config_table *bct = NULL; 162 163 bct = (nvboot_config_table *)(context->bct);
CID 1323484: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
164 assert(context != NULL); 165 assert(bct != NULL); 166 167 switch (token) { 168 CASE_GET_DEV_PARAM(sdmmc, clock_divider); 169 CASE_GET_DEV_PARAM(sdmmc, data_width);
** CID 1323483: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 199 in t124_get_sdram_param()
________________________________________________________________________________________________________ *** CID 1323483: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 199 in t124_get_sdram_param() 193 u_int32_t *value) 194 { 195 nvboot_sdram_params *params; 196 nvboot_config_table *bct = NULL; 197 198 bct = (nvboot_config_table *)(context->bct);
CID 1323483: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
199 assert(context != NULL); 200 assert(bct != NULL); 201 params = &(bct->sdram_params[index]); 202 203 switch (token) { 204 CASE_GET_SDRAM_PARAM(memory_type);
** CID 1323482: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 1104 in t124_init_bad_block_table()
________________________________________________________________________________________________________ *** CID 1323482: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 1104 in t124_init_bad_block_table() 1098 u_int32_t bytes_per_entry; 1099 nvboot_badblock_table *table; 1100 nvboot_config_table *bct; 1101 1102 bct = (nvboot_config_table *)(context->bct); 1103
CID 1323482: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1104 assert(context != NULL); 1105 assert(bct != NULL); 1106 1107 table = &bct->badblock_table; 1108 1109 bytes_per_entry = ICEIL(context->partition_size,
** CID 1323481: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 128 in t124_set_dev_param()
________________________________________________________________________________________________________ *** CID 1323481: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 128 in t124_set_dev_param() 122 parse_token token, 123 u_int32_t value) 124 { 125 nvboot_config_table *bct = NULL; 126 127 bct = (nvboot_config_table *)(context->bct);
CID 1323481: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
128 assert(context != NULL); 129 assert(bct != NULL); 130 131 bct->num_param_sets = NV_MAX(bct->num_param_sets, index + 1); 132 133 switch (token) {
** CID 1323480: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 529 in t124_set_sdram_param()
________________________________________________________________________________________________________ *** CID 1323480: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t124/nvbctlib_t124.c: 529 in t124_set_sdram_param() 523 u_int32_t value) 524 { 525 nvboot_sdram_params *params; 526 nvboot_config_table *bct = NULL; 527 528 bct = (nvboot_config_table *)(context->bct);
CID 1323480: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
529 assert(context != NULL); 530 assert(bct != NULL); 531 params = &(bct->sdram_params[index]); 532 /* Update the number of SDRAM parameter sets. */ 533 bct->num_sdram_sets = NV_MAX(bct->num_sdram_sets, index + 1); 534
** CID 1323479: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t210/nvbctlib_t210.c: 164 in t210_get_dev_param()
________________________________________________________________________________________________________ *** CID 1323479: Null pointer dereferences (REVERSE_INULL) /util/nvidia/cbootimage/src/t210/nvbctlib_t210.c: 164 in t210_get_dev_param() 158 parse_token token, 159 u_int32_t *value) 160 { 161 nvboot_config_table *bct = NULL; 162 163 bct = (nvboot_config_table *)(context->bct);
CID 1323479: Null pointer dereferences (REVERSE_INULL) Null-checking "context" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
164 assert(context != NULL); 165 assert(bct != NULL); 166 167 switch (token) { 168 CASE_GET_DEV_PARAM(sdmmc, clock_divider); 169 CASE_GET_DEV_PARAM(sdmmc, data_width);
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/coreboot?tab=overview
To manage Coverity Scan email notifications for "coreboot@coreboot.org", click https://scan.coverity.com/subscriptions/edit?email=coreboot%40coreboot.org&a...