typo
This commit is contained in:
9
tp/tp1/src/ex2/buf.c
Normal file
9
tp/tp1/src/ex2/buf.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "helpers.h"
|
||||
|
||||
static char buffer[16 MB] = {0};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
randomize(buffer, 16 MB);
|
||||
return interlude();
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
#include "helpers.h"
|
||||
#include <stdio.h>
|
||||
static char buf[16 MB] = {0};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
buf[0] = 12;
|
||||
long int ad;
|
||||
printf("buf = %p\n",buf);
|
||||
ad = (long int)buf;
|
||||
ad = (ad & 0xfffffffff000) + 0x1000 - ad ;
|
||||
buf[ad - 1] = 13;
|
||||
//randomize(buf, 16 MB);
|
||||
return interlude();
|
||||
}
|
Reference in New Issue
Block a user