Skip to content

Commit

Permalink
Merge pull request #1168 jphickey/fix-1167-vxworks-alias
Browse files Browse the repository at this point in the history
Fix #1167, vxWorks intLib stub aliasing issue
  • Loading branch information
astrogeco committed Nov 3, 2021
2 parents 4a2cadd + a2ad51e commit ea46a57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ OCS_VOIDFUNCPTR *OCS_INUM_TO_IVEC(unsigned int ui)
OCS_VOIDFUNCPTR * VecTbl;
static OCS_VOIDFUNCPTR DummyVec;
size_t VecTblSize;
void * GenericPtr;

if (Status == 0)
{
UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), (void **)&VecTbl, &VecTblSize, NULL);
UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), &GenericPtr, &VecTblSize, NULL);
VecTbl = GenericPtr;
if (VecTbl != NULL && ui < (VecTblSize / sizeof(OCS_VOIDFUNCPTR)))
{
VecTbl += ui;
Expand Down

0 comments on commit ea46a57

Please sign in to comment.