Add code and tests
This commit is contained in:
parent
020a4542fb
commit
ce57d811ff
5
code/.gitignore
vendored
Normal file
5
code/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
gcc-9.2.0.tar.xz
|
||||||
|
gcc-9.2.0.tar.xz.sig
|
||||||
|
llvm-project.181ab91efc9.tar.xz
|
||||||
|
clang.181ab91efc9
|
||||||
|
gcc-9.2
|
8
code/build_clang.sh
Executable file
8
code/build_clang.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
mkdir build \
|
||||||
|
&& cd build \
|
||||||
|
&& cmake -DLLVM_ENABLE_PROJECTS=clang \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-G "Unix Makefiles" ../llvm \
|
||||||
|
&& make -j8
|
10
code/build_gcc.sh
Executable file
10
code/build_gcc.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
mkdir objdir \
|
||||||
|
&& cd objdir \
|
||||||
|
&& ../configure \
|
||||||
|
--build=x86_64-linux-gnu \
|
||||||
|
--host=x86_64-linux-gnu \
|
||||||
|
--target=x86_64-linux-gnu \
|
||||||
|
--disable-multilib \
|
||||||
|
&& make -j8
|
1
code/checksec_result_clang.json
Normal file
1
code/checksec_result_clang.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ "vuln.clang": { "relro":"partial","canary":"no","nx":"yes","pie":"no","rpath":"no","runpath":"no","symbols":"yes","fortify_source":"no","fortified":"0","fortify-able":"0" } }
|
1
code/checksec_result_gcc.json
Normal file
1
code/checksec_result_gcc.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ "vuln.gcc": { "relro":"partial","canary":"no","nx":"yes","pie":"no","rpath":"no","runpath":"no","symbols":"yes","fortify_source":"no","fortified":"0","fortify-able":"0" } }
|
13
code/vuln.c
Normal file
13
code/vuln.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include<string.h>
|
||||||
|
void vuln(char *input) {
|
||||||
|
char buf[50];
|
||||||
|
size_t len = strlen(input);
|
||||||
|
for (size_t i = 0; i < len; i++) {
|
||||||
|
buf[i] = input[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
vuln(argv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
BIN
code/vuln.clang
Executable file
BIN
code/vuln.clang
Executable file
Binary file not shown.
BIN
code/vuln.gcc
Executable file
BIN
code/vuln.gcc
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user