Fwd: New Defects reported by Coverity Scan for Das U-Boot

Tom Rini
2024-12-24T17:21:28Z

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

Hey all,

Unfortunately Coverity went a bit weird for a bit and stopped doing
emails, so there's a few other defects missing from this.

---------- Forwarded message ---------
From: <scan-admin@coverity.com>
Date: Tue, Dec 24, 2024 at 11:05 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.

1 new defect(s) introduced to Das U-Boot found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)

** CID 516463: Null pointer dereferences (FORWARD_NULL)
/boot/image-android.c: 300 in android_image_get_kernel()

________________________________________________________________________________________________________
*** CID 516463: Null pointer dereferences (FORWARD_NULL)
/boot/image-android.c: 300 in android_image_get_kernel()
294
295 if (*img_data.kcmdline) {
296 printf("Kernel command line: %s\n",
img_data.kcmdline);
297 len += strlen(img_data.kcmdline) + (len ? 1 : 0);
/* +1 for extra space */
298 }
299
>>> CID 516463: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "img_data.kcmdline_extra".
300 if (*img_data.kcmdline_extra) {
301 printf("Kernel extra command line: %s\n",
img_data.kcmdline_extra);
302 len += strlen(img_data.kcmdline_extra) + (len ? 1 :
0); /* +1 for extra space */
303 }
304
305 char *newbootargs = malloc(len + 1); /* +1 for the '\0' */

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

--
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]