From edccd846b943fddbe3e68caf5fb773c64ea822d1 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Thu, 2 May 2024 10:48:01 -0400 Subject: iniparser: upgrade 4.1 -> 4.2 License-Update: Copyright year updated to 2024. CVE-2023-33461.patch removed since it's included in 4.2 Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- .../iniparser/iniparser/CVE-2023-33461.patch | 48 ---------------------- meta-oe/recipes-support/iniparser/iniparser_4.1.bb | 28 ------------- meta-oe/recipes-support/iniparser/iniparser_4.2.bb | 27 ++++++++++++ 3 files changed, 27 insertions(+), 76 deletions(-) delete mode 100644 meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch delete mode 100644 meta-oe/recipes-support/iniparser/iniparser_4.1.bb create mode 100644 meta-oe/recipes-support/iniparser/iniparser_4.2.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch b/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch deleted file mode 100644 index db5fb06aa..000000000 --- a/meta-oe/recipes-support/iniparser/iniparser/CVE-2023-33461.patch +++ /dev/null @@ -1,48 +0,0 @@ -CVE: CVE-2023-33461 -Upstream-Status: Backport [https://github.com/ndevilla/iniparser/pull/146/commits/ace9871f65d11b5d73f0b9ee8cf5d2807439442d] -Signed-off-by: Lee Chee Yang - - -From ace9871f65d11b5d73f0b9ee8cf5d2807439442d Mon Sep 17 00:00:00 2001 -From: Antonio -Date: Fri, 2 Jun 2023 15:03:10 -0300 -Subject: [PATCH] Handle null return from iniparser_getstring - -Fix handling of NULL returns from iniparser_getstring in -iniparser_getboolean, iniparser_getlongint and iniparser_getdouble, -avoiding a crash. ---- - src/iniparser.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/iniparser.c b/src/iniparser.c -index f1d1658..dbceb20 100644 ---- a/src/iniparser.c -+++ b/src/iniparser.c -@@ -456,7 +456,7 @@ long int iniparser_getlongint(const dictionary * d, const char * key, long int n - const char * str ; - - str = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (str==INI_INVALID_KEY) return notfound ; -+ if (str==NULL || str==INI_INVALID_KEY) return notfound ; - return strtol(str, NULL, 0); - } - -@@ -511,7 +511,7 @@ double iniparser_getdouble(const dictionary * d, const char * key, double notfou - const char * str ; - - str = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (str==INI_INVALID_KEY) return notfound ; -+ if (str==NULL || str==INI_INVALID_KEY) return notfound ; - return atof(str); - } - -@@ -553,7 +553,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound) - const char * c ; - - c = iniparser_getstring(d, key, INI_INVALID_KEY); -- if (c==INI_INVALID_KEY) return notfound ; -+ if (c==NULL || c==INI_INVALID_KEY) return notfound ; - if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') { - ret = 1 ; - } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') { diff --git a/meta-oe/recipes-support/iniparser/iniparser_4.1.bb b/meta-oe/recipes-support/iniparser/iniparser_4.1.bb deleted file mode 100644 index c80668d27..000000000 --- a/meta-oe/recipes-support/iniparser/iniparser_4.1.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)." -SECTION = "libs" -HOMEPAGE = "https://github.com/ndevilla/iniparser" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e02baf71c76e0650e667d7da133379ac" - -DEPENDS = "doxygen-native" - -PV .= "+git" - -SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https;branch=master \ - file://0001-iniparser.pc-Make-libpath-a-variable.patch \ - file://Add-CMake-support.patch \ - file://CVE-2023-33461.patch \ -" - -SRCREV= "deb85ad4936d4ca32cc2260ce43323d47936410d" - -S = "${WORKDIR}/git" - -inherit cmake - -do_install:append() { - install -Dm 0644 ${S}/iniparser.pc ${D}${libdir}/pkgconfig/iniparser.pc - sed -i -e 's,@baselib@,${baselib},g' ${D}${libdir}/pkgconfig/iniparser.pc -} - -BBCLASSEXTEND += "native" diff --git a/meta-oe/recipes-support/iniparser/iniparser_4.2.bb b/meta-oe/recipes-support/iniparser/iniparser_4.2.bb new file mode 100644 index 000000000..d44772590 --- /dev/null +++ b/meta-oe/recipes-support/iniparser/iniparser_4.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)." +SECTION = "libs" +HOMEPAGE = "https://github.com/ndevilla/iniparser" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8474d3b745f77e203f1fc82fb0bb7678" + +DEPENDS = "doxygen-native" + +PV .= "+git" + +SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https;branch=master \ + file://0001-iniparser.pc-Make-libpath-a-variable.patch \ + file://Add-CMake-support.patch \ +" + +SRCREV = "9f5a6da1c245b44f49a46212ec0d81ffb1f821aa" + +S = "${WORKDIR}/git" + +inherit cmake + +do_install:append() { + install -Dm 0644 ${S}/iniparser.pc ${D}${libdir}/pkgconfig/iniparser.pc + sed -i -e 's,@baselib@,${baselib},g' ${D}${libdir}/pkgconfig/iniparser.pc +} + +BBCLASSEXTEND += "native" -- cgit v1.2.3-54-g00ecf