Skip to content

Commit

Permalink
Merge pull request #98 from astrogeco/integration-candidate
Browse files Browse the repository at this point in the history
elf2cfetbl Integration candidate: Caelum+dev1
  • Loading branch information
astrogeco committed Dec 6, 2021
2 parents 10f55fb + 8afde1d commit 16c50d8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ See README.txt for more information.

## Version History

### Development Build: v3.3.0-rc4+dev4

- Fix Untrusted divisor (TAINTED_SCALAR) static analysis warning by checking `get_sh_entsize(SectionHeader)`
- Set baseline for cFS-Caelum-rc4: v3.3.0-rc4
- Update mission rev to use 0xFF for development version
- See <https://github.com/nasa/elf2cfetbl/pull/98> and <https://github.com/nasa/cfs/pull/390>

### Development Build: v3.2.0-rc1+dev30

- Implement Coding Standard in CodeQL workflow
Expand Down
9 changes: 8 additions & 1 deletion elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,14 @@ int32 GetSectionHeader(int32 SectionIndex, union Elf_Shdr *SectionHeader)
SymbolTableDataOffset = SectionHeader->Shdr64.sh_offset + sizeof(Elf64_Sym);
}
SymbolTableEntrySize = get_sh_entsize(SectionHeader);
NumSymbols = (get_sh_size(SectionHeader) / get_sh_entsize(SectionHeader)) - 1;
if (SymbolTableEntrySize == 0)
{
NumSymbols = 0;
}
else
{
NumSymbols = (get_sh_size(SectionHeader) / SymbolTableEntrySize) - 1;
}
sprintf(VerboseStr, "SHT_SYMTAB (2) - # Symbols = %lu", (long unsigned int)NumSymbols);
break;

Expand Down
21 changes: 14 additions & 7 deletions elf2cfetbl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,24 @@
/*
* Development Build Macro Definitions
*/
#define ELF2CFETBL_BUILD_NUMBER 30 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_NUMBER 4 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_BASELINE \
"v3.2.0-rc1" /*!< @brief Development Build: git tag that is the base for the current */
"v3.3.0-rc4" /*!< @brief Development Build: git tag that is the base for the current */

/*
* Version Macro Definitions
*/
#define ELF2CFETBL_MAJOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define ELF2CFETBL_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define ELF2CFETBL_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define ELF2CFETBL_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define ELF2CFETBL_MISSION_REV 0xFF

/*
* Tools to construct version string
Expand All @@ -59,9 +66,9 @@
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
*/
#define ELF2CFETBL_VERSION_STRING \
" elf2cfetbl Development Build\n" \
" " ELF2CFETBL_VERSION " (Codename: Bootes)\n" /* Codename for current development */ \
" Last Official Release: elf2cfetbl v3.1.0" /* For full support please use official release version */
#define ELF2CFETBL_VERSION_STRING \
" elf2cfetbl Development Build\n" \
" " ELF2CFETBL_VERSION " (Codename: Draco)\n" /* Codename for current development */ \
" Last Official Release: elf2cfetbl v3.1.0" /* For full support please use official release version */

#endif /* ELF2CFETBL_VERSION_H */

0 comments on commit 16c50d8

Please sign in to comment.