Hi,

Please find the latest report on new defect(s) introduced to coreboot found 
with Coverity Scan.

6 new defect(s) introduced to coreboot found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

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


** CID 1504475:    (PRINTF_ARGS)


________________________________________________________________________________________________________
*** CID 1504475:    (PRINTF_ARGS)
/util/cbfstool/eventlog.c: 492 in eventlog_print_data()
486                     [ELOG_TYPE_FW_VBOOT_INFO]       = sizeof(uint16_t),
487                     [ELOG_TYPE_FW_EARLY_SOL]        = sizeof(uint8_t),
488                     [0xff]                          = 0,
489             };
490     
491             if (event->length <= sizeof(*event) + 
elog_type_to_min_size[event->type]) {
>>>     CID 1504475:    (PRINTF_ARGS)
>>>     Argument "event->length - 8UL" to format specifier "%u" was expected to 
>>> have type "unsigned int" but has type "unsigned long".
492                     eventlog_printf("INVALID DATA (length = %u)", 
event->length - sizeof(*event));
493                     return 0;
494             }
495     
496             switch (event->type) {
497             case ELOG_TYPE_LOG_CLEAR: {
/util/cbfstool/eventlog.c: 626 in eventlog_print_data()
620                     eventlog_printf("boot_mode=%s", 
vb2_boot_mode_string(info->boot_mode));
621     
622                     if (info->boot_mode == VB2_BOOT_MODE_BROKEN_SCREEN ||
623                         info->boot_mode == VB2_BOOT_MODE_MANUAL_RECOVERY) {
624                             if (event->length <= sizeof(*event) + 
sizeof(*info))
625                                     eventlog_printf("INVALID DATA (length = 
%u)",
>>>     CID 1504475:    (PRINTF_ARGS)
>>>     Argument "event->length - 8UL" to format specifier "%u" was expected to 
>>> have type "unsigned int" but has type "unsigned long".
626                                       event->length - sizeof(*event));
627                             else
628                                     
eventlog_printf("recovery_reason=%#x/%#x (%s)",
629                                       info->recovery_reason, 
info->recovery_subcode,
630                                       
vb2_get_recovery_reason_string(info->recovery_reason));
631                     }

** CID 1451331:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 925 in 
yaml.v3.yaml_parser_parse_flow_sequence_entry(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()


________________________________________________________________________________________________________
*** CID 1451331:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 925 in 
yaml.v3.yaml_parser_parse_flow_sequence_entry(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()
919     // flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE 
flow_node?)?
920     //                          *
921     //
922     func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event 
*yaml_event_t, first bool) bool {
923             if first {
924                     token := peek_token(parser)
>>>     CID 1451331:  Null pointer dereferences  (NULL_RETURNS)
>>>     Accessing field of null object "token".
925                     parser.marks = append(parser.marks, token.start_mark)
926                     skip_token(parser)
927             }
928             token := peek_token(parser)
929             if token == nil {
930                     return false

** CID 1451317:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 816 in 
yaml.v3.yaml_parser_parse_block_mapping_key(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()


________________________________________________________________________________________________________
*** CID 1451317:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 816 in 
yaml.v3.yaml_parser_parse_block_mapping_key(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()
810     //                          BLOCK-END
811     //                          *********
812     //
813     func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event 
*yaml_event_t, first bool) bool {
814             if first {
815                     token := peek_token(parser)
>>>     CID 1451317:  Null pointer dereferences  (NULL_RETURNS)
>>>     Accessing field of null object "token".
816                     parser.marks = append(parser.marks, token.start_mark)
817                     skip_token(parser)
818             }
819     
820             token := peek_token(parser)
821             if token == nil {

** CID 1451316:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 789 in 
yaml.v3.yaml_parser_split_stem_comment(*yaml.v3.yaml_parser_t, int)()


________________________________________________________________________________________________________
*** CID 1451316:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 789 in 
yaml.v3.yaml_parser_split_stem_comment(*yaml.v3.yaml_parser_t, int)()
783     func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len 
int) {
784             if stem_len == 0 {
785                     return
786             }
787     
788             token := peek_token(parser)
>>>     CID 1451316:  Null pointer dereferences  (NULL_RETURNS)
>>>     Accessing field of null object "token".
789             if token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != 
yaml_BLOCK_MAPPING_START_TOKEN {
790                     return
791             }
792     
793             parser.stem_comment = parser.head_comment[:stem_len]
794             if len(parser.head_comment) == stem_len {

** CID 1451308:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 690 in 
yaml.v3.yaml_parser_parse_block_sequence_entry(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()


________________________________________________________________________________________________________
*** CID 1451308:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 690 in 
yaml.v3.yaml_parser_parse_block_sequence_entry(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()
684     // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* 
BLOCK-END
685     //                    ********************  *********** *             
*********
686     //
687     func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, 
event *yaml_event_t, first bool) bool {
688             if first {
689                     token := peek_token(parser)
>>>     CID 1451308:  Null pointer dereferences  (NULL_RETURNS)
>>>     Accessing field of null object "token".
690                     parser.marks = append(parser.marks, token.start_mark)
691                     skip_token(parser)
692             }
693     
694             token := peek_token(parser)
695             if token == nil {

** CID 1451305:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 1060 in 
yaml.v3.yaml_parser_parse_flow_mapping_key(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()


________________________________________________________________________________________________________
*** CID 1451305:  Null pointer dereferences  (NULL_RETURNS)
/util/goswid/vendor/gopkg.in/yaml.v3/parserc.go: 1060 in 
yaml.v3.yaml_parser_parse_flow_mapping_key(*yaml.v3.yaml_parser_t, 
*yaml.v3.yaml_event_t, bool)bool()
1054     // flow_mapping_entry   ::= flow_node | KEY flow_node? (VALUE 
flow_node?)?
1055     //                          *           *** *
1056     //
1057     func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event 
*yaml_event_t, first bool) bool {
1058            if first {
1059                    token := peek_token(parser)
>>>     CID 1451305:  Null pointer dereferences  (NULL_RETURNS)
>>>     Accessing field of null object "token".
1060                    parser.marks = append(parser.marks, token.start_mark)
1061                    skip_token(parser)
1062            }
1063     
1064            token := peek_token(parser)
1065            if token == nil {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3DwWIX_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn0C1UxenUquhll45gfaBEICfJa5Z-2Bxv62OJnmB6Wemrcw1TPUe-2Fj3p9Mn1u6f-2BWWYMEtvYmc6mwHhymdkg8bqp2Bzy1U3AsjJeixw9hGEzTaQhCbjSH85vKwB3h1AzT2LyUQwTzQa2lK8LaIONd4emx-2FpTNs-2FXtISqiqULsLHmFeQ-3D-3D

_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org

Reply via email to