Add TD8
This commit is contained in:
parent
7c934bcefb
commit
453d88282f
8 changed files with 588 additions and 0 deletions
19
content/secu_logicielle/td8-gdb/files/modif2.c
Normal file
19
content/secu_logicielle/td8-gdb/files/modif2.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
void f(char *x, int n) {
|
||||
memset(x, '\0', n);
|
||||
}
|
||||
|
||||
void g(char *y, int n) {
|
||||
return f(y, n);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int b = 1234567890;
|
||||
int c = 1234567890;
|
||||
char a[] = "Hello, you!";
|
||||
g(a, sizeof(a) + 1);
|
||||
printf("%p:%d %p:%d %p\n", &b, b, &c, c, &a);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue