mxj: initial integration (#8155)

This commit is contained in:
manunio 2022-08-05 20:19:02 +05:30 committed by GitHub
parent d04436b85c
commit ef6355819d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 0 deletions

22
projects/mxj/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
# Copyright 2022 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.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder-go
RUN apt-get update && apt-get install -y make autoconf automake libtool
RUN git clone --depth 1 https://github.com/clbanning/mxj mxj
COPY build.sh $SRC/
COPY fuzz.go $SRC/mxj
WORKDIR $SRC/mxj

18
projects/mxj/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash -eu
# Copyright 2022 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.
#
################################################################################
compile_go_fuzzer . FuzzMapXml fuzz_map_xml gofuzz

15
projects/mxj/fuzz.go Normal file
View File

@ -0,0 +1,15 @@
package mxj
func FuzzMapXml(data []byte) int {
m, err := NewMapXml(data)
if err != nil {
return 0
}
_, err = m.Xml()
if err != nil {
return 0
}
return 1
}

10
projects/mxj/project.yaml Normal file
View File

@ -0,0 +1,10 @@
homepage: "https://github.com/clbanning/mxj"
language: go
fuzzing_engines:
- libfuzzer
sanitizers:
- address
main_repo: "https://github.com/clbanning/mxj"
vendor_ccs:
- maxnair.dev@gmail.com
file_github_issue: true