Skip to content

Instantly share code, notes, and snippets.

@hshrzd

hshrzd/memcmp.c Secret

Created Jan 4, 2021
Embed
What would you like to do?
/*
Compile:
gcc -fPIC -c -m32 memcmp.c -o memcmp.o
gcc -shared -m32 -o memcmp.so memcmp.o
*/
#include <stdio.h>
int memcmp(const void *s1, const void *s2, size_t n)
{
printf("s1: %s\n", (char*)s1);
printf("s2: %s\n", (char*)s2);
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment