diff --git a/README.en.md b/README.en.md deleted file mode 100644 index a5cc25da04f045f87db96ddd21f07e8ca9af8f35..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# cjson - -#### Description -cjson - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 0ddf6fc269e5eddd1d1d69713996db678d0eba6a..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# cjson - -#### 介绍 -cjson - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/cjson-1.7.15.tar.gz b/cjson-1.7.15.tar.gz deleted file mode 100644 index bc92023d9fcc421fd2c8fefd0cba740c6b25f8ab..0000000000000000000000000000000000000000 Binary files a/cjson-1.7.15.tar.gz and /dev/null differ diff --git a/cjson-1.7.17-Bugfix_for_CVE-2024-31755.patch b/cjson-1.7.17-Bugfix_for_CVE-2024-31755.patch new file mode 100644 index 0000000000000000000000000000000000000000..b054b8de9e9ed50dabdd63b32eb576a37500d0f9 --- /dev/null +++ b/cjson-1.7.17-Bugfix_for_CVE-2024-31755.patch @@ -0,0 +1,14 @@ +diff -Nur ../cJSON-1.7.17.orig/cJSON.c ./cJSON.c +--- ../cJSON-1.7.17.orig/cJSON.c 2024-08-20 17:32:05.387677910 +0800 ++++ ./cJSON.c 2024-08-20 17:42:47.041211785 +0800 +@@ -405,8 +405,8 @@ + { + return NULL; + } +- /* return NULL if the object is corrupted */ +- if (object->valuestring == NULL) ++ /* return NULL if the object is corrupted or valuestring is NULL */ ++ if (object->valuestring == NULL || valuestring == NULL) + { + return NULL; + } diff --git a/cjson-1.7.17.tar.gz b/cjson-1.7.17.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8240989d1d58770f532a9c0f2dbc2f4cc80e7d5b Binary files /dev/null and b/cjson-1.7.17.tar.gz differ diff --git a/cjson.spec b/cjson.spec index 1b52000ffabd44df30866233a542268c60c470ec..e16875118053f4aa4232e96349867c3f80ed6e1a 100644 --- a/cjson.spec +++ b/cjson.spec @@ -1,13 +1,13 @@ -%define anolis_release 1 - Name: cjson -Version: 1.7.15 -Release: %{anolis_release}%{?dist} +Version: 1.7.17 +Release: 2%{?dist} Summary: Ultralightweight JSON parser in ANSI C - -License: MIT and ASL 2.0 + +# several files in tests/ are Apache-2.0 but are not packaged +License: MIT URL: https://github.com/DaveGamble/cJSON Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: cjson-1.7.17-Bugfix_for_CVE-2024-31755.patch BuildRequires: gcc BuildRequires: cmake @@ -18,24 +18,16 @@ done with. It's a single file of C, and a single header file. %package devel Summary: Development files for cJSON -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: cmake-filesystem %description devel The %{name}-devel package contains libraries and header files for developing applications that use cJSON. - -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch - -%description doc -The %{name}-doc package contains documentation files for %{name}. - + %prep -%autosetup -n cJSON-%{version} +%autosetup -n cJSON-%{version} -p 0 %build %cmake -DENABLE_CJSON_TEST=ON -DENABLE_TARGET_EXPORT=ON @@ -45,26 +37,64 @@ The %{name}-doc package contains documentation files for %{name}. %cmake_install rm -f %{buildroot}%{_libdir}/*.{la,a} -%generate_compatibility_deps - %check %ctest +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + %files %license LICENSE -%dir %{abidir} +%doc README.md %{_libdir}/libcjson*.so.* -%{abidir}/libcjson.dump - + %files devel +%doc CHANGELOG.md CONTRIBUTORS.md %{_libdir}/libcjson.so %{_libdir}/pkgconfig/libcjson.pc %{_libdir}/cmake/cJSON/ %{_includedir}/cjson/ -%files doc -%doc README.md CHANGELOG.md CONTRIBUTORS.md - %changelog -* Mon Aug 07 2023 mgb01105731 - 1.7.15-1 -- Init upstream from version 1.7.15 +* Tue Aug 20 2024 wangpanfeng - 1.7.17.-2 +- Fix CVE-2024-31755 + +* Sun Apr 07 2024 Fabian Affolter - 1.7.17.-1 +- Update to latest upstream version 1.7.17 (closes rhbz#2255953) +- Fix rhbz#2254647 + +* Tue Jan 23 2024 Fedora Release Engineering - 1.7.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.7.15-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 1.7.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Mar 01 2023 Petr Menšík - 1.7.15-1 +- Update to 1.7.15 +- Export also CMake module + +* Wed Jan 18 2023 Fedora Release Engineering - 1.7.14-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 1.7.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 1.7.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 1.7.14-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.7.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Dec 11 2020 Fabian Affolter - 1.7.14-2 +- Adjust license tag, it's MIT and ASL 2.0 (#1905273) +- Replace ldconfig scriplets +- Fix requires: + +* Mon Dec 07 2020 Fabian Affolter - 1.7.14-1 +- Initial package for Fedora