Skip to content

Commit 966a334

Browse files
committed
fixed typos
1 parent 0072fba commit 966a334

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

src/BlackBone/ManualMap/MExcept.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ NTSTATUS MExcept::CreateVEH( Process& proc, ModuleData& mod, bool partial )
224224
_pModTable = std::move( mem.result() );
225225
}
226226

227-
ModuleTable table;
227+
ModuleTable table = { };
228228
_pModTable.Read ( 0, table );
229229

230230
// Add new entry to the table
@@ -326,7 +326,7 @@ NTSTATUS MExcept::CreateVEH( Process& proc, ModuleData& mod, bool partial )
326326
/// </summary>
327327
/// <param name="proc">Target process</param>
328328
/// <param name="partial">Partial exception support</param>
329-
/// <param name="mt">Mosule type</param>
329+
/// <param name="mt">Module type</param>
330330
/// <returns>Status code</returns>
331331
NTSTATUS MExcept::RemoveVEH( Process& proc, bool partial, eModType mt )
332332
{

src/BlackBone/ManualMap/MExcept.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class MExcept
3434
BLACKBONE_API MExcept() = default;
3535
BLACKBONE_API ~MExcept() = default;
3636

37+
MExcept( const MExcept& ) = delete;
38+
MExcept& operator =( const MExcept& ) = delete;
39+
3740
/// <summary>
3841
/// Inject VEH wrapper into process
3942
/// Used to enable execution of SEH handlers out of image
@@ -49,26 +52,21 @@ class MExcept
4952
/// </summary>
5053
/// <param name="proc">Target process</param>
5154
/// <param name="partial">Partial exception support</param>
52-
/// <param name="mt">Mosule type</param>
55+
/// <param name="mt">Module type</param>
5356
/// <returns>Status code</returns>
5457
BLACKBONE_API NTSTATUS RemoveVEH( class Process& proc, bool partial, eModType mt );
5558

5659
/// <summary>
5760
/// Reset data
5861
/// </summary>
59-
BLACKBONE_API inline void reset() { _pModTable.Free(); }
60-
61-
private:
62-
MExcept( const MExcept& ) = delete;
63-
MExcept& operator =(const MExcept&) = delete;
62+
BLACKBONE_API void reset() { _pModTable.Free(); }
6463

6564
private:
66-
MemBlock _pVEHCode; // VEH function codecave
67-
MemBlock _pModTable; // x64 module address range table
68-
uint64_t _hVEH = 0; // VEH handle
65+
MemBlock _pVEHCode; // VEH function codecave
66+
MemBlock _pModTable; // x64 module address range table
67+
uint64_t _hVEH = 0; // VEH handle
6968

7069
static uint8_t _handler32[];
7170
static uint8_t _handler64[];
7271
};
73-
74-
}
72+
}

src/BlackBone/ManualMap/Native/NtLoader.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ NtLdr::NtLdr( Process& proc )
1616
{
1717
}
1818

19-
NtLdr::~NtLdr(void)
20-
{
21-
}
22-
2319
/// <summary>
2420
/// Initialize some loader stuff
2521
/// </summary>
@@ -648,7 +644,7 @@ void NtLdr::InsertTailList( ptr_t ListHead, ptr_t Entry )
648644
/// <summary>
649645
/// Hash image name
650646
/// </summary>
651-
/// <param name="str">Iamge name</param>
647+
/// <param name="str">Image name</param>
652648
/// <returns>Hash</returns>
653649
ULONG NtLdr::HashString( const std::wstring& str )
654650
{
@@ -658,7 +654,7 @@ ULONG NtLdr::HashString( const std::wstring& str )
658654
{
659655
UNICODE_STRING ustr;
660656
SAFE_CALL( RtlInitUnicodeString, &ustr, str.c_str() );
661-
SAFE_NATIVE_CALL( RtlHashUnicodeString, &ustr, (BOOLEAN)TRUE, 0, &hash );
657+
SAFE_NATIVE_CALL( RtlHashUnicodeString, &ustr, BOOLEAN(TRUE), 0, &hash );
662658
}
663659
else
664660
{

src/BlackBone/ManualMap/Native/NtLoader.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace blackbone
1111
{
12-
1312
enum LdrRefFlags
1413
{
1514
Ldr_None = 0x00, // Do not create any reference
@@ -34,7 +33,6 @@ class NtLdr
3433
{
3534
public:
3635
BLACKBONE_API NtLdr( class Process& proc );
37-
BLACKBONE_API ~NtLdr( void );
3836

3937
/// <summary>
4038
/// Initialize some loader stuff
@@ -164,7 +162,7 @@ class NtLdr
164162
/// <summary>
165163
/// Hash image name
166164
/// </summary>
167-
/// <param name="str">Iamge name</param>
165+
/// <param name="str">Image name</param>
168166
/// <returns>Hash</returns>
169167
ULONG HashString( const std::wstring& str );
170168

@@ -190,7 +188,7 @@ class NtLdr
190188
/// </summary>
191189
/// <param name="mod">Module data</param>
192190
/// <returns>Address of removed record</returns>
193-
template<typename T>
191+
template<typename T>
194192
ptr_t UnlinkFromLdr( const ModuleData& mod );
195193

196194
/// <summary>
@@ -220,7 +218,7 @@ class NtLdr
220218
ptr_t UnlinkTreeNode( const ModuleData& mod, ptr_t ldrEntry, bool noThread = false );
221219

222220
NtLdr( const NtLdr& ) = delete;
223-
NtLdr& operator =(const NtLdr&) = delete;
221+
NtLdr& operator =( const NtLdr& ) = delete;
224222

225223
private:
226224
class Process& _process; // Process memory routines
@@ -232,6 +230,4 @@ class NtLdr
232230
eModType _initializedFor = mt_unknown; // Loader initialization target
233231
std::map<ptr_t, ptr_t> _nodeMap; // Allocated native structures
234232
};
235-
236233
}
237-

0 commit comments

Comments
 (0)