Skip to content

Instantly share code, notes, and snippets.

@vanhoefm
Last active December 11, 2015 00:09
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/4514830 to your computer and use it in GitHub Desktop.
Save vanhoefm/4514830 to your computer and use it in GitHub Desktop.
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
char *buf1 = malloc(128);
char *buf2 = malloc(256);
read(fileno(stdin), buf1, 200);
free(buf2);
free(buf1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment