aboutsummaryrefslogtreecommitdiff
path: root/projects/libpg_query
diff options
context:
space:
mode:
authorDavidKorczynski <david@adalogics.com>2021-05-07 19:08:51 +0100
committerGitHub <noreply@github.com>2021-05-07 11:08:51 -0700
commitc8c12960a974e78648f76e8f612d591789e80309 (patch)
tree5b35ea1a4a0c4a403e031786be019332fb2b03c6 /projects/libpg_query
parentf59d8d36b52c767a88a46241b1478f5f825e1b4a (diff)
downloadoss-fuzz-c8c12960a974e78648f76e8f612d591789e80309.tar.gz
libpg_query: clean up following upstream merge. (#5736)
Diffstat (limited to 'projects/libpg_query')
-rw-r--r--projects/libpg_query/Dockerfile1
-rwxr-xr-xprojects/libpg_query/build.sh2
-rw-r--r--projects/libpg_query/fuzz_parser.c33
-rw-r--r--projects/libpg_query/project.yaml3
4 files changed, 3 insertions, 36 deletions
diff --git a/projects/libpg_query/Dockerfile b/projects/libpg_query/Dockerfile
index 1fef8ae95..90f173b33 100644
--- a/projects/libpg_query/Dockerfile
+++ b/projects/libpg_query/Dockerfile
@@ -18,4 +18,3 @@ FROM gcr.io/oss-fuzz-base/base-builder
RUN git clone --depth 1 https://github.com/pganalyze/libpg_query libpg_query
WORKDIR libpg_query
COPY build.sh $SRC/
-COPY fuzz_parser.c $SRC/libpg_query/fuzz_parser.c
diff --git a/projects/libpg_query/build.sh b/projects/libpg_query/build.sh
index f1ac573e1..0b5aa9f01 100755
--- a/projects/libpg_query/build.sh
+++ b/projects/libpg_query/build.sh
@@ -16,4 +16,4 @@
################################################################################
make build
-$CC $CFLAGS $LIB_FUZZING_ENGINE ./fuzz_parser.c ./libpg_query.a -I./ -o $OUT/fuzz_parser
+$CC $CFLAGS $LIB_FUZZING_ENGINE ./test/fuzz/fuzz_parser.c ./libpg_query.a -I./ -o $OUT/fuzz_parser
diff --git a/projects/libpg_query/fuzz_parser.c b/projects/libpg_query/fuzz_parser.c
deleted file mode 100644
index 8003da31d..000000000
--- a/projects/libpg_query/fuzz_parser.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright 2021 Google LLC
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-#include <pg_query.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-
-int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
- char *new_str = (char *)malloc(size+1);
- if (new_str == NULL){
- return 0;
- }
- memcpy(new_str, data, size);
- new_str[size] = '\0';
-
- PgQueryParseResult result = pg_query_parse(new_str);
- pg_query_free_parse_result(result);
-
- free(new_str);
- return 0;
-}
diff --git a/projects/libpg_query/project.yaml b/projects/libpg_query/project.yaml
index 765711dbb..11d7e74c2 100644
--- a/projects/libpg_query/project.yaml
+++ b/projects/libpg_query/project.yaml
@@ -3,4 +3,5 @@ language: c
primary_contact: "team@pganalyze.com"
main_repo: "https://github.com/pganalyze/pg_query"
auto_ccs:
- - david@adalogics.com
+ - "lukas@pganalyze.com"
+ - "david@adalogics.com"