Skip to content

Instantly share code, notes, and snippets.

@andreybleme
Last active July 24, 2019 21:59
Show Gist options
  • Save andreybleme/b0442c8ca5b013c1afad942631c4cb12 to your computer and use it in GitHub Desktop.
Save andreybleme/b0442c8ca5b013c1afad942631c4cb12 to your computer and use it in GitHub Desktop.
andreybleme.com | O que é Memory Safety
/* Programa 3 */
struct foo {
int x;
int y;
char *pc;
};
struct foo *pf = malloc(...);
pf->x = 5;
pf->y = 256;
pf->pc = "before";
pf->pc += 3;
int *px = &pf->x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment