Skip to content

Instantly share code, notes, and snippets.

@TotallyNotAHaxxer
Last active August 29, 2025 15:12
Show Gist options
  • Save TotallyNotAHaxxer/f0726593f405cd5f8c47b25ce6b152e2 to your computer and use it in GitHub Desktop.
Save TotallyNotAHaxxer/f0726593f405cd5f8c47b25ce6b152e2 to your computer and use it in GitHub Desktop.
free() example for a FREE (pun intended) course called RC8 released by SkyPenguinLabs or SPLabs
#include <iostream>
//// Haxxernote: it throws a security warning, its a bad unsafe function
int main() {
char input[10];
std::cout << "Enter your name> ";
std::cin >> input;
char* copy = (char*)malloc(strlen(input) * sizeof(char));
strcpy(copy, input);
std::cout << "Echo -> " << copy << std::endl;
free(copy);
return 0;
}
///// target: x64
///// type : Release
///// pre_processing macros:
/*
NDEBUG
_CONSOLE
_CRT_SECURE_NO_WARNINGS
_UNICODE
UNICODE
*/
//// RTLT (Runtime library type used) - Multi Threaded / Multi Threaded DLL (both work, we used both for the sample)
//// via: REC8 by SkyPenguinLabs @skypenguinlabs.wtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment