Hi,
Please find the latest report on new defect(s) introduced to coreboot found
with Coverity Scan.
1 new defect(s) introduced to coreboot found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1441844: (NULL_RETURNS)
/util/intelmetool/intelmetool.c: 55 in dumpmemfile()
/util/intelmetool/intelmetool.c: 53 in dumpmemfile()
________________________________________________________________________________________________________
*** CID 1441844: (NULL_RETURNS)
/util/intelmetool/intelmetool.c: 55 in dumpmemfile()
49 {
50 FILE *fp = fopen("medump.bin", "w");
51 uint32_t i;
52 for (i = 0; i < size; i++) {
53 fprintf(fp, "%c", *((uint8_t *) (phys + i)));
54 }
>>> CID 1441844: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "fp" when calling "fclose".
55 fclose(fp);
56 }
57
58 static int isCPUGenuineIntel(void)
59 {
60 regs_t regs;
/util/intelmetool/intelmetool.c: 53 in dumpmemfile()
47
48 static void dumpmemfile(uint8_t *phys, uint32_t size)
49 {
50 FILE *fp = fopen("medump.bin", "w");
51 uint32_t i;
52 for (i = 0; i < size; i++) {
>>> CID 1441844: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "fp" when calling
>>> "fprintf". [Note: The source code implementation of the function has been
>>> overridden by a builtin model.]
53 fprintf(fp, "%c", *((uint8_t *) (phys + i)));
54 }
55 fclose(fp);
56 }
57
58 static int isCPUGenuineIntel(void)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3DyVGK_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn2niRMgNqnR8qkZSR4RB52QHGLy8EwFtoU4zkN9vgeQVyAHW7r6rLDAaPKN2OwjmrxGCpO6IK5Lz-2BfAbzinfno52TJdrfCSpiQPbiHNFQfAU1zGylp5q063i9pj-2Bl-2BQquuKMaUKYa5Poqm409WovY0u7EyTkCGZ36Hpzzw9061B2l34f08lUz9xAJM3bSVOZW0-3D
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]