
Here's the latest report.
---------- Forwarded message --------- From: scan-admin@coverity.com Date: Mon, May 29, 2023, 11:10 AM Subject: New Defects reported by Coverity Scan for Das U-Boot To: tom.rini@gmail.com
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.
New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s)
** CID 461871: Null pointer dereferences (NULL_RETURNS) /tools/renesas_spkgimage.c: 56 in spkgimage_parse_config_line()
________________________________________________________________________________________________________ *** CID 461871: Null pointer dereferences (NULL_RETURNS) /tools/renesas_spkgimage.c: 56 in spkgimage_parse_config_line() 50 char *saveptr; 51 char *delim = "\t "; 52 char *name = strtok_r(line, delim, &saveptr); 53 char *val_str = strtok_r(NULL, delim, &saveptr); 54 int value = atoi(val_str); 55
CID 461871: Null pointer dereferences (NULL_RETURNS) Dereferencing a pointer that might be "NULL" "name" when calling
"strcmp". [Note: The source code implementation of the function has been overridden by a builtin model.] 56 if (!strcmp("VERSION", name)) { 57 conf.version = check_range(name, value, 1, 15); 58 } else if (!strcmp("NAND_ECC_ENABLE", name)) { 59 conf.ecc_enable = check_range(name, value, 0, 1); 60 } else if (!strcmp("NAND_ECC_BLOCK_SIZE", name)) { 61 conf.ecc_block_size = check_range(name, value, 0, 2);
** CID 461870: Resource leaks (RESOURCE_LEAK) /tools/renesas_spkgimage.c: 106 in spkgimage_parse_config_file()
________________________________________________________________________________________________________ *** CID 461870: Resource leaks (RESOURCE_LEAK) /tools/renesas_spkgimage.c: 106 in spkgimage_parse_config_file() 100 101 /* Strip any trailing newline */ 102 line[strcspn(line, "\n")] = 0; 103 104 /* Parse the line */ 105 if (spkgimage_parse_config_line(line, line_num))
CID 461870: Resource leaks (RESOURCE_LEAK) Variable "fcfg" going out of scope leaks the storage it points to.
106 return -EINVAL; 107 } 108 109 fclose(fcfg); 110 111 /* Avoid divide-by-zero later on */