Last active
July 24, 2019 21:59
-
-
Save andreybleme/b0442c8ca5b013c1afad942631c4cb12 to your computer and use it in GitHub Desktop.
andreybleme.com | O que é Memory Safety
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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