Skip to content
New issue

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

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

Already on GitHub? # to your account

Unterminated variadic call in UT tools, CodeQL warning #781

Closed
skliper opened this issue Feb 9, 2021 · 0 comments · Fixed by #782 or #774
Closed

Unterminated variadic call in UT tools, CodeQL warning #781

skliper opened this issue Feb 9, 2021 · 0 comments · Fixed by #782 or #774
Labels
bug security unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Feb 9, 2021

Is your feature request related to a problem? Please describe.
CodeQL warning on:

#define UT_DEFAULT_IMPL_RC(FuncName, Rc) UT_DefaultStubImpl(#FuncName, UT_KEY(FuncName), Rc)

int32 UT_DefaultStubImpl(const char *FunctionName, UT_EntryKey_t FuncKey, int32 DefaultRc, ...)
{
int32 Retcode;
va_list va;
va_start(va, DefaultRc);
Retcode = UT_DefaultStubImplWithArgs(FunctionName, FuncKey, DefaultRc, va);
va_end(va);
return Retcode;
}

Describe the solution you'd like
Terminate list with NULL in macro

Describe alternatives you've considered
None

Additional context
CodeQL warning

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Feb 9, 2021
@skliper skliper added this to the 6.0.0 milestone Feb 9, 2021
skliper added a commit to skliper/osal that referenced this issue Feb 9, 2021
skliper added a commit to skliper/osal that referenced this issue Feb 11, 2021
astrogeco added a commit that referenced this issue Feb 12, 2021
Fix #781, Terminate UT macro variadic lists
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Implements message header module such that users
can customize or extend as needed.
 - Separates code for easier selection
 - Implements consistent getter/setter APIs
 - Fix nasa#736/nasa#781: MsgId logic no longer overrides bits in init
 - Fix nasa#529: Get size supports max size
 - Adds single big endian time implementation, but not selected
 - Adds msg module to module list
 - Adds msg module to cppcheck
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug security unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
2 participants