Skip to contentSkip to conversation

New Defects reported by Coverity Scan for Das U-Boot

DISCUSSION Tom Rini 1 participant 1 message Dec 24, 2024

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

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: <[email protected]>
Date: Tue, Dec 24, 2024 at 11:05 AM
Subject: New Defects reported by Coverity Scan for Das U-Boot
To: <[email protected]>

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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 -----

Signature · 1 line
Tom