author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Mon, 06 Oct 2014 02:28:53 +0100 | |
changeset 207 | e74a45933842 |
parent 206 | 0105257429f3 |
child 208 | 204564b899a0 |
progs/test1.c | file | annotate | diff | comparison | revisions |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/progs/test1.c Mon Oct 06 02:28:53 2014 +0100 @@ -0,0 +1,16 @@ +#include <string.h> +#include <stdio.h> +#include <stdlib.h> + +void foo (char *bar) +{ + unsigned long long my_long = 101010101; // in hex: \xB5\x4A\x05\x06 +} + +int main (int argc, char **argv) +{ + foo("my string is too long !!!!!"); // all is normal + foo("my string is too long !!!!! \x15\xcd\x5b\x07"); // overwrites my_long + return 0; +} +