diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..f9bdf348e14d4649f6c39975c242dd6085cb5e2f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,11 @@ +stages: + - var +var: + stage: var + image: ubuntu:latest + script: + - echo "starting" + - apt-get update && apt-get install clang -y + - echo "clang installed" + - clang -g -O1 -fsanitize=fuzzer,address fuzz_target.cc halla.c + - ./a.out -max_total_time=10 diff --git a/a.out b/a.out new file mode 100755 index 0000000000000000000000000000000000000000..68197cf6c3a41f45c63f9945a7b80dab6073b19d Binary files /dev/null and b/a.out differ diff --git a/halla.c b/halla.c index ac19a224d87cd1cdbf64ebf0dff8e0041a66bd19..23e2c71881709e2353beec690344a406173c8e02 100644 --- a/halla.c +++ b/halla.c @@ -6,7 +6,7 @@ char *checkChar(char str[50]) { int i; char *newstr; - newstr = (char *)calloc(200,1); + newstr = (char *) calloc(strlen(str)*4+1,1); for (i = 0; i < strlen(str); i++) { if (str[i] == '&') { const char *ch = "&";