Skip to content

Commit

Permalink
Merge pull request #314 from jphickey/fix-313-stub-databuf
Browse files Browse the repository at this point in the history
Fix #313, check the address in PSP get segment stubs
  • Loading branch information
astrogeco committed Oct 20, 2021
2 parents 1bd7bd9 + 7106dd9 commit 6a9533b
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 6a9533b

Please sign in to comment.