Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overrun warnings false alarm for CFE_MSG_Message_t #1992

Open
ArielSAdamsNASA opened this issue Oct 6, 2021 · 1 comment
Open

Overrun warnings false alarm for CFE_MSG_Message_t #1992

ArielSAdamsNASA opened this issue Oct 6, 2021 · 1 comment

Comments

@ArielSAdamsNASA
Copy link

ArielSAdamsNASA commented Oct 6, 2021

Describe the bug
Out-of-bounds access (OVERRUN)

Expected behavior
Fix overruns

Code snips
Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 159 using argument 160UL.

CFE_MSG_Init(&CFE_EVS_Global.EVS_TlmPkt.TlmHeader.Msg, CFE_SB_ValueToMsgId(CFE_EVS_HK_TLM_MID),
sizeof(CFE_EVS_Global.EVS_TlmPkt));

Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 47 using argument 48UL.

CFE_MSG_Init(&ShortEventTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(CFE_EVS_SHORT_EVENT_MSG_MID),
sizeof(ShortEventTlm));

Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 31 using argument 32UL.

CFE_MSG_Init(&SubRptMsg.Hdr.Msg, CFE_SB_ValueToMsgId(CFE_SB_ONESUB_TLM_MID), sizeof(SubRptMsg));

Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 43 using argument 44UL.

CFE_MSG_Init(&CFE_SB_Global.HKTlmMsg.Hdr.Msg, CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID),
sizeof(CFE_SB_Global.HKTlmMsg));

Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 299 using argument 300UL.

CFE_MSG_Init(&CFE_TBL_Global.HkPacket.TlmHeader.Msg, CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID),

Overrunning struct type CFE_MSG_Message_t of 8 bytes by passing it to a function which accesses it at byte offset 27 using argument 28UL.

CFE_MSG_Init(&CFE_TIME_Global.ToneDataCmd.CmdHeader.Msg, CFE_SB_ValueToMsgId(CFE_TIME_DATA_CMD_MID),
sizeof(CFE_TIME_Global.ToneDataCmd));

System observed on:
Coverity: https://scan.coverity.com/projects/arielsadamsnasa-cfs-jsf-rules?tab=overview

Reporter Info
Ariel Adams, ASRC Federal

@skliper
Copy link
Contributor

skliper commented Oct 7, 2021

False alarms, changed to enhancement since it would be good to squash the warnings if possible.

@skliper skliper changed the title Overruns for CFE_MSG_Message_t Overrun warnings false alarm for CFE_MSG_Message_t Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants