From c3c81f9ae460ed0d36d77688b46958057a7f3f9f Mon Sep 17 00:00:00 2001 From: youbing54 Date: Fri, 28 Feb 2025 15:22:52 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:=20https://gitee.com/openharmony/third?= =?UTF-8?q?=5Fparty=5FcJSON/issues/IBPPMD=20describe:=20=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Feature=20or=20Bugfix:=20Bugfix=20Binary?= =?UTF-8?q?=20Source:Yes=20Signed-off-by:=20youbing54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuzzing/afl-prepare-linux.sh | 20 ++++++++++++++++++++ fuzzing/afl.sh | 19 +++++++++++++++++++ fuzzing/ossfuzz.sh | 21 +++++++++++++++++++++ tests/unity/auto/unity_test_summary.py | 2 ++ tests/unity/auto/unity_to_junit.py | 22 ++++++++++++++++++++++ 5 files changed, 84 insertions(+) diff --git a/fuzzing/afl-prepare-linux.sh b/fuzzing/afl-prepare-linux.sh index 41c9b89..60bde8e 100755 --- a/fuzzing/afl-prepare-linux.sh +++ b/fuzzing/afl-prepare-linux.sh @@ -1,4 +1,24 @@ #!/bin/bash +# Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + set -x echo core | sudo tee /proc/sys/kernel/core_pattern diff --git a/fuzzing/afl.sh b/fuzzing/afl.sh index 8f0f02f..90954f3 100755 --- a/fuzzing/afl.sh +++ b/fuzzing/afl.sh @@ -1,4 +1,23 @@ #!/bin/bash +# Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. mkdir -p afl-build || exit 1 cd afl-build || exit 1 diff --git a/fuzzing/ossfuzz.sh b/fuzzing/ossfuzz.sh index a2da64b..2b0756f 100755 --- a/fuzzing/ossfuzz.sh +++ b/fuzzing/ossfuzz.sh @@ -1,8 +1,29 @@ #!/bin/bash -eu +# Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. # This script is meant to be run by # https://github.com/google/oss-fuzz/blob/master/projects/cjson/Dockerfile +set -e + mkdir build cd build cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF .. diff --git a/tests/unity/auto/unity_test_summary.py b/tests/unity/auto/unity_test_summary.py index 4c20e52..8936973 100644 --- a/tests/unity/auto/unity_test_summary.py +++ b/tests/unity/auto/unity_test_summary.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- #! python3 # ========================================== # Unity Project - A Test Framework for C diff --git a/tests/unity/auto/unity_to_junit.py b/tests/unity/auto/unity_to_junit.py index 71dd568..a50a8af 100644 --- a/tests/unity/auto/unity_to_junit.py +++ b/tests/unity/auto/unity_to_junit.py @@ -1,3 +1,25 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# Copyright (c) 2009-2017 Dave Gamble and cJSON contributors + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + import sys import os from glob import glob -- Gitee