From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Ralph Siemsen <ralph.siemsen@linaro.org>
Subject: [tom.rini@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot]
Date: Mon, 29 May 2023 16:04:40 -0400 [thread overview]
Message-ID: <20230529200440.GF3755309@bill-the-cat> (raw)
[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]
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 */
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next reply other threads:[~2023-05-29 20:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 20:04 Tom Rini [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-18 16:26 [tom.rini@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot] Tom Rini
2023-12-21 14:48 ` Shantur Rathore
2023-12-21 16:08 ` Tom Rini
2023-11-06 20:27 Tom Rini
2023-11-07 11:18 ` Ilias Apalodimas
2023-11-07 23:18 ` Johan Jonker
2023-11-08 13:54 ` Tom Rini
2023-11-08 3:24 ` Alexander Gendin
2023-11-08 14:29 ` Tom Rini
2023-10-24 1:18 Tom Rini
2023-10-24 15:05 ` Sughosh Ganu
2023-10-24 18:05 ` Tom Rini
2023-07-27 17:38 Tom Rini
2023-03-27 19:19 Tom Rini
2023-01-31 15:02 Tom Rini
2022-12-06 14:51 Tom Rini
2022-08-24 11:40 Tom Rini
2022-09-08 18:19 ` Simon Glass
2022-08-24 11:40 Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230529200440.GF3755309@bill-the-cat \
--to=trini@konsulko.com \
--cc=ralph.siemsen@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox