Skip to content

Instantly share code, notes, and snippets.

@vanhoefm
Last active December 12, 2015 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanhoefm/4704510 to your computer and use it in GitHub Desktop.
Save vanhoefm/4704510 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char *buf1, *buf2, *buf3;
if (argc != 4) return;
buf1 = malloc(256);
strcpy(buf1, argv[1]);
buf2 = malloc(strtoul(argv[2], NULL, 16));
buf3 = malloc(256);
strcpy(buf3, argv[3]);
free(buf3);
free(buf2);
free(buf1);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment