summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2016-02-24 21:41:18 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2016-02-24 21:41:18 +0100
commitcda8f89a9dd0cfea7be1529f506612dfbca25898 (patch)
treec939182804b14fca143673b0628000fe98539778 /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
parentff314da1740080a6cf1920f5ab2583ec3c60e3d2 (diff)
downloadhercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.gz
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.bz2
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.tar.xz
hercules-cda8f89a9dd0cfea7be1529f506612dfbca25898.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 5bbc8fefb..c647ca3e1 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4425,6 +4425,33 @@ char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *
}
return retVal___;
}
+char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
+ char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
int hIndex = 0;
if( HPMHooks.count.HP_iMalloc_free_pre ) {