From a0c75fa3bca05d3a3556e091df68bc732d6ca63a Mon Sep 17 00:00:00 2001
From: segfault <segfault@secmail.pro>
Date: Mon, 25 Mar 2019 02:48:41 +0100
Subject: mostly spelling

Signed-off-by: segfault <segfault@secmail.pro>
---
 injector.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/injector.c b/injector.c
index 9dbfe40..19d37da 100644
--- a/injector.c
+++ b/injector.c
@@ -4,7 +4,7 @@
 
 #include <windows.h>
 
-/* structure which describes the Windows Portable Executable format */
+/* structure which describes a Windows (P)ortable (E)xecutable */
 typedef struct pe_buffer {
     uint8_t *buf;
     size_t siz;
@@ -43,7 +43,7 @@ typedef union shellcode_trailer {
     struct {
         uint8_t inst;
         uint32_t addr;
-    } GCC_PACKED insts[2]; /* second array entry is required for the FIXME */
+    } GCC_PACKED insts[2]; /* second array item required for FIXME */
 } GCC_PACKED shellcode_trailer;
 
 
@@ -66,6 +66,7 @@ typedef void (__stdcall *shellcode_fn)(void);
 #define WIN_PERROR(error_prefix) \
     printf("%s failed: %lu\n", error_prefix, GetLastError());
 
+/* simple binary compare fn */
 static int bcmp(uint8_t *b1, uint8_t *b2, size_t length)
 {
 	uint8_t *p1 = b1, *p2 = b2;
@@ -236,7 +237,7 @@ static int prepare_last_section(pe_buffer *pe, uint8_t **ptrToShellcode)
     /* It is important to fixup section protections!
      * Otherwise an Access Violation will occur most likely.
      */
-    last_section->Characteristics |= IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE;
+    last_section->Characteristics |= IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE;
 
     /* Place (unpatched) shellcode at the end of the section. */
     memcpy(pe->buf + shellcode_offset, &shellcode, shellcode_size);
-- 
cgit v1.2.3