1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2025-04-18 03:28:59 +00:00

Change the definition of shemu_printf so that unused parameters are removed from the compiled binary ()

* Change the definition of shemu_printf so that unused parameters (strings etc.)  are removed from the compiled binary

* Syntax fix

* Fix the implementation of shemu_internal_printf

* Replace NULL by ND_NULL in the invocation of shemu_internal_printf
This commit is contained in:
junkzours 2025-02-21 03:53:24 -05:00 committed by GitHub
parent c282f06215
commit c43ceb8a34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -12,11 +12,11 @@
//
// shemu_printf - simple version
// shemu_internal_printf - simple version
//
#ifndef BDDISASM_NO_FORMAT
void
shemu_printf(
shemu_internal_printf(
SHEMU_CONTEXT *Context,
char *formatstring,
...
@ -41,7 +41,7 @@ shemu_printf(
}
#else
void
shemu_printf(
shemu_internal_printf(
SHEMU_CONTEXT *Context,
char *formatstring,
...

View File

@ -12,6 +12,12 @@
#endif
#ifndef BDDISASM_NO_FORMAT
#define shemu_printf(Context, formatstring, ...) shemu_internal_printf(Context, formatstring, __VA_ARGS__)
#else
#define shemu_printf(Context, formatstring, ...) do { (void)formatstring; shemu_internal_printf(Context, ND_NULL, __VA_ARGS__); } while (0)
#endif
// The SHELLBMP and STACKBMP are two bitmaps which hold the state of each shellcode byte and each stack byte.
// Inside SHELLBMP, we store whether a shellcode byte has been fetched for execution or not, and whether it was
// modified or not.
@ -65,7 +71,7 @@
void
shemu_printf(
shemu_internal_printf(
SHEMU_CONTEXT *Context,
char *formatstring,
...