Sinisterly
Concatenation in C void* char* - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C)
+--- Thread: Concatenation in C void* char* (/Thread-Concatenation-in-C-void-char)



Concatenation in C void* char* - 0x6f776c - 10-28-2017

Hello guys

I got this code :
Code:
LPVOID lpvAddr;
lpvAddr = VirtualAlloc(NULL, strlen(jmp_esp), 0x3000, 0x40);

char *x = "\x41\x42\x43";
char *all;
strcat(all , x);
strcat(all , lpvAddr);     // here I got error because can't concate char * with lpvAddr

How can I get the value of lpvaddr in hex (ex:\x00\x22\x33\x44) and append it to <all> variable ?


thanks