Skip to content

Commit

Permalink
Fix #313, check the address in PSP get segment stubs
Browse files Browse the repository at this point in the history
Checks the correct local variable (TempAddr) to see if the
data buffer address was set by the test case
  • Loading branch information
jphickey committed Oct 18, 2021
1 parent 1bd7bd9 commit 7106dd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ut-stubs/ut_psp_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
if (status >= 0)
{
UT_GetDataBuffer(UT_KEY(CFE_PSP_GetCFETextSegmentInfo), &TempAddr, &TempSize, NULL);
if (*PtrToCFESegment == 0)
if (TempAddr == NULL)
{
/* Backup -- Set the pointer and size to anything */
*PtrToCFESegment = (cpuaddr)&LocalTextSegment;
Expand Down Expand Up @@ -602,7 +602,7 @@ int32 CFE_PSP_GetKernelTextSegmentInfo(cpuaddr *PtrToKernelSegment, uint32 *Size
if (status >= 0)
{
UT_GetDataBuffer(UT_KEY(CFE_PSP_GetKernelTextSegmentInfo), &TempAddr, &TempSize, NULL);
if (*PtrToKernelSegment == 0)
if (TempAddr == NULL)
{
/* Backup -- Set the pointer and size to anything */
*PtrToKernelSegment = (cpuaddr)&LocalTextSegment;
Expand Down

0 comments on commit 7106dd9

Please sign in to comment.