From 42df4964f0553b4ee6207e558d70d9d85b64efbd Mon Sep 17 00:00:00 2001 From: Peter Meerwald-Stadler Date: Fri, 2 Aug 2024 21:28:08 +0200 Subject: [PATCH] Fix some more typos (#1084) --- api/python/examples/authenticode/api_example.py | 2 +- .../examples/authenticode/authenticode_reader.py | 2 +- api/python/src/DWARF/types/pyBase.cpp | 2 +- api/python/src/ELF/objects/pyNote.cpp | 2 +- api/python/src/PDB/types/pyClassLike.cpp | 2 +- api/rust/cargo/lief/src/dwarf/types/base.rs | 2 +- api/rust/cargo/lief/src/elf/header.rs | 2 +- api/rust/cargo/lief/src/pdb/types/classlike.rs | 2 +- cmake/LIEFOptions.cmake | 6 +++--- include/LIEF/DWARF/types/Base.hpp | 2 +- include/LIEF/ELF/Header.hpp | 2 +- include/LIEF/PDB/types/ClassLike.hpp | 2 +- src/PE/Binary.cpp | 2 +- src/PE/Builder.tcc | 14 +++++++------- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/api/python/examples/authenticode/api_example.py b/api/python/examples/authenticode/api_example.py index 2c1c0f91bb..94efe18b79 100644 --- a/api/python/examples/authenticode/api_example.py +++ b/api/python/examples/authenticode/api_example.py @@ -33,7 +33,7 @@ # Get the certificate used by the signer cert_signer = pe.signatures[0].signers[0].cert print(cert_signer) -bin_ca.verify(cert_signer) # Verify that cert_signer is signed the the CA +bin_ca.verify(cert_signer) # Verify that cert_signer is signed the CA # running with: # LIEF_CA_BUNDLE=signify/signify/certs/authenticode-bundle.pem python ./authenticode.py avast_free_antivirus_setup_online.exe diff --git a/api/python/examples/authenticode/authenticode_reader.py b/api/python/examples/authenticode/authenticode_reader.py index d82252f317..f3b8df9d7f 100644 --- a/api/python/examples/authenticode/authenticode_reader.py +++ b/api/python/examples/authenticode/authenticode_reader.py @@ -203,7 +203,7 @@ def main(): parser.add_argument('-H', '--hash', action='store_true', dest='show_hash', - help='Show the autentihash value') + help='Show the authentihash value') parser.add_argument('-C', '--check', action='store_true', dest='check_sig', diff --git a/api/python/src/DWARF/types/pyBase.cpp b/api/python/src/DWARF/types/pyBase.cpp index a00c218b07..335fcbd382 100644 --- a/api/python/src/DWARF/types/pyBase.cpp +++ b/api/python/src/DWARF/types/pyBase.cpp @@ -25,7 +25,7 @@ void create(nb::module_& m) { type .def_prop_ro("encoding", &dw::types::Base::encoding, R"doc( - Describe how the the base type is encoded and should be interpreted. + Describe how the base type is encoded and should be interpreted. )doc"_doc ) ; diff --git a/api/python/src/ELF/objects/pyNote.cpp b/api/python/src/ELF/objects/pyNote.cpp index b13e0f13ad..aa03a1ad6b 100644 --- a/api/python/src/ELF/objects/pyNote.cpp +++ b/api/python/src/ELF/objects/pyNote.cpp @@ -139,7 +139,7 @@ void create(nb::module_& m) { R"doc( Return the original `NT_` value of the note. - This value should be interpreted according the the :attr:`~.name` of the + This value should be interpreted according the :attr:`~.name` of the note. )doc"_doc) diff --git a/api/python/src/PDB/types/pyClassLike.cpp b/api/python/src/PDB/types/pyClassLike.cpp index c64f25b870..7a1f0ba4bd 100644 --- a/api/python/src/PDB/types/pyClassLike.cpp +++ b/api/python/src/PDB/types/pyClassLike.cpp @@ -52,7 +52,7 @@ void create(nb::module_& m) { .def_prop_ro("size", &pdb::types::ClassLike::size, R"doc( - Size of the the type including all its attributes. This size should match + Size of the type including all its attributes. This size should match the ``sizeof(...)`` this type. )doc"_doc ) diff --git a/api/rust/cargo/lief/src/dwarf/types/base.rs b/api/rust/cargo/lief/src/dwarf/types/base.rs index 6428bf1e8e..6d8f6b1d93 100644 --- a/api/rust/cargo/lief/src/dwarf/types/base.rs +++ b/api/rust/cargo/lief/src/dwarf/types/base.rs @@ -84,7 +84,7 @@ impl FromFFI for Base<'_> { } impl Base<'_> { - /// Describe how the the base type is encoded and should be interpreted + /// Describe how the base type is encoded and should be interpreted pub fn encoding(&self) -> Encoding { Encoding::from(self.ptr.encoding()) } diff --git a/api/rust/cargo/lief/src/elf/header.rs b/api/rust/cargo/lief/src/elf/header.rs index 1078096015..d5ef2dbc32 100644 --- a/api/rust/cargo/lief/src/elf/header.rs +++ b/api/rust/cargo/lief/src/elf/header.rs @@ -290,7 +290,7 @@ impl Header<'_> { self.ptr.program_header_size() } - /// Return the the number of segments + /// Return the number of segments pub fn numberof_segments(&self) -> u32 { self.ptr.numberof_segments() } diff --git a/api/rust/cargo/lief/src/pdb/types/classlike.rs b/api/rust/cargo/lief/src/pdb/types/classlike.rs index 4019f4185e..9cc3c1d148 100644 --- a/api/rust/cargo/lief/src/pdb/types/classlike.rs +++ b/api/rust/cargo/lief/src/pdb/types/classlike.rs @@ -22,7 +22,7 @@ pub trait ClassLike { self.get_classlike().name().to_string() } - /// Size of the the type including all its attributes. This size should match + /// Size of the type including all its attributes. This size should match /// the `sizeof(...)` this type. fn size(&self) -> u64 { self.get_classlike().size() diff --git a/cmake/LIEFOptions.cmake b/cmake/LIEFOptions.cmake index 6c952167d2..d1bb81ebab 100644 --- a/cmake/LIEFOptions.cmake +++ b/cmake/LIEFOptions.cmake @@ -15,7 +15,7 @@ option(LIEF_EXTRA_WARNINGS "Enable extra warning from the compiler" option(LIEF_LOGGING "Enable logging" ON) option(LIEF_LOGGING_DEBUG "Enable debug logging" ON) option(LIEF_ENABLE_JSON "Enable JSON-related APIs" ON) -option(LIEF_OPT_NLOHMANN_JSON_EXTERNAL "Use nlohmann/json externaly" OFF) +option(LIEF_OPT_NLOHMANN_JSON_EXTERNAL "Use nlohmann/json externally" OFF) option(LIEF_FORCE_API_EXPORTS "Force exports of API symbols" OFF) option(LIEF_PY_LIEF_EXT "Use a pre-installed version of LIEF for the bindings" OFF) option(LIEF_RUST_API "Generate the C++ bridge for Rust's cxx" OFF) @@ -41,7 +41,7 @@ cmake_dependent_option(LIEF_PYTHON_STATIC "Internal usage" OFF "LIEF_PYTHON_API" OFF) # OAT support relies on the ELF and DEX format. -# Therefore, these options must be enabled to support use this format +# Therefore, these options must be enabled to support this format cmake_dependent_option(LIEF_OAT "Build LIEF with OAT module" ON "LIEF_ELF;LIEF_DEX" OFF) @@ -70,7 +70,7 @@ cmake_dependent_option(LIEF_INSTALL_COMPILED_EXAMPLES "Install LIEF Compiled exa option(LIEF_EXTERNAL_SPDLOG OFF) # This option enables to provide an external -# version of TartanLlama/expected (e.g. present on the system) +# version of TartanLlama/expected (e.g. present on the system) option(LIEF_OPT_EXTERNAL_EXPECTED OFF) # This option enables to provide an external version of utf8cpp diff --git a/include/LIEF/DWARF/types/Base.hpp b/include/LIEF/DWARF/types/Base.hpp index 199d2d06dc..c8ead523ff 100644 --- a/include/LIEF/DWARF/types/Base.hpp +++ b/include/LIEF/DWARF/types/Base.hpp @@ -57,7 +57,7 @@ class LIEF_API Base : public Type { return type->kind() == Type::KIND::BASE; } - /// Describe how the the base type is encoded and should be interpreted + /// Describe how the base type is encoded and should be interpreted ENCODING encoding() const; ~Base() override; diff --git a/include/LIEF/ELF/Header.hpp b/include/LIEF/ELF/Header.hpp index 0693f9e350..dc8c62df84 100644 --- a/include/LIEF/ELF/Header.hpp +++ b/include/LIEF/ELF/Header.hpp @@ -176,7 +176,7 @@ class LIEF_API Header : public Object { return program_header_size_; } - /// Return the the number of segments + /// Return the number of segments uint32_t numberof_segments() const { return numberof_segments_; } diff --git a/include/LIEF/PDB/types/ClassLike.hpp b/include/LIEF/PDB/types/ClassLike.hpp index 1424937a11..024ed385e2 100644 --- a/include/LIEF/PDB/types/ClassLike.hpp +++ b/include/LIEF/PDB/types/ClassLike.hpp @@ -51,7 +51,7 @@ class LIEF_API ClassLike : public Type { /// Iterator over the different methods implemented in this class-type type methods_iterator methods() const; - /// Size of the the type including all its attributes. This size should match + /// Size of the type including all its attributes. This size should match /// the `sizeof(...)` this type. uint64_t size() const; diff --git a/src/PE/Binary.cpp b/src/PE/Binary.cpp index 1964f05db3..a27f36b0e4 100644 --- a/src/PE/Binary.cpp +++ b/src/PE/Binary.cpp @@ -671,7 +671,7 @@ uint32_t Binary::predict_function_rva(const std::string& library, const std::str } - // We assume the the idata section will be the last section + // We assume the idata section will be the last section const auto section_align = static_cast(optional_header().section_alignment()); const uint64_t next_virtual_address = align(std::accumulate( std::begin(sections_), diff --git a/src/PE/Builder.tcc b/src/PE/Builder.tcc index e7a36bbaa5..e1de8cf8bd 100644 --- a/src/PE/Builder.tcc +++ b/src/PE/Builder.tcc @@ -102,7 +102,7 @@ template void Builder::build_import_table() { using uint__ = typename PE_T::uint; - // Compute size of the the diffrent (sub)sections + // Compute size of the different (sub)sections // inside the future import section // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -112,10 +112,10 @@ void Builder::build_import_table() { // Size of import entries uint32_t entries_size = 0; - // Size of the section which will holds imported functions names + // Size of the section which will hold the imported functions names uint32_t functions_name_size = 0; - // Size of the section which will holds library name (e.g. kernel32.dll) + // Size of the section which will hold the library name (e.g. kernel32.dll) uint32_t libraries_name_size = 0; // Size of the trampoline section @@ -137,10 +137,10 @@ void Builder::build_import_table() { trampolines_size += import.entries().size() * trampoline_size; } - // Offset of the diffrents sections inside *import section* + // Offset of the different sections inside *import section* // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Offset to the import table (i.e list of pe_import) + // Offset to the import table (i.e. list of pe_import) uint32_t import_table_offset = 0; // Offset to the lookup table: After import table @@ -149,10 +149,10 @@ void Builder::build_import_table() { // Address table (IAT). Identical to the lookup table until the library is bound uint32_t iat_offset = lookuptable_offset + entries_size / 2; - // Offset to the section which will contains hints/names of the imported functions name + // Offset to the section which will contain hints/names of the imported functions name uint32_t functions_name_offset = iat_offset + entries_size / 2; - // Offset of the section which will holds libraries name + // Offset of the section which will hold libraries name uint32_t libraries_name_offset = functions_name_offset + functions_name_size; // Offset of the section where trampolines will be written