Hi,

Please find the latest report on new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.

Defect Details

** CID 500810:       Incorrect expression  (SIZEOF_MISMATCH)
/contrib/libeventlog/src/event_log.c: 394           in event_log_write_specid_event()


_____________________________________________________________________________________________
*** CID 500810:         Incorrect expression  (SIZEOF_MISMATCH)
/contrib/libeventlog/src/event_log.c: 394             in event_log_write_specid_event()
388     	}
389     
390     	/* TCG_EfiSpecIdEvent.VendorInfo */
391     	if (vendor_info_size > 0) {
392     		vendor_info_ptr =
393     			(tcg_vendor_info_t
>>>     CID 500810:         Incorrect expression  (SIZEOF_MISMATCH)
>>>     Adding "4UL /* sizeof (id_event_algorithm_size_t) */ * algo_count" to pointer "spec_id_ptr->digest_size" of type "id_event_algorithm_size_t *" is suspicious because adding an integral value to this pointer automatically scales that value by the size, 4 bytes, of the pointed-to type, "id_event_algorithm_size_t".  Most likely, the multiplication by "sizeof (id_event_algorithm_size_t)" in this expression is extraneous and should be eliminated.
394     				 *)(spec_id_ptr->digest_size +
395     				    sizeof(id_event_algorithm_size_t) *
396     					    algo_count);
397     
398     		vendor_info_ptr->vendor_info_size = vendor_info_size;
399     

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team