Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libeconf for openSUSE:Factory checked in at 2026-10-10 14:55:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libeconf (Old) and /work/SRC/openSUSE:Factory/.libeconf.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libeconf" Sat Oct 10 14:55:16 2026 rev:42 rq:1382809 version:0.8.5 Changes: -------- --- /work/SRC/openSUSE:Factory/libeconf/libeconf.changes 2026-07-26 11:28:11.950139273 +0200 +++ /work/SRC/openSUSE:Factory/.libeconf.new.3698736/libeconf.changes 2026-10-10 14:55:18.288754193 +0200 @@ -1,0 +2,6 @@ +Tue Oct 06 14:07:57 UTC 2026 - [email protected] + +- Update to version 0.8.5: + * Fix a crash if sections are empty (#249) + +------------------------------------------------------------------- python-libeconf.changes: same change Old: ---- libeconf-0.8.4.tar.xz New: ---- libeconf-0.8.5.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libeconf.spec ++++++ --- /var/tmp/diff_new_pack.diLkjX/_old 2026-10-10 14:55:19.917822304 +0200 +++ /var/tmp/diff_new_pack.diLkjX/_new 2026-10-10 14:55:19.926822680 +0200 @@ -18,7 +18,7 @@ %define lname libeconf0 Name: libeconf -Version: 0.8.4 +Version: 0.8.5 Release: 0 Summary: Enhanced config file parser ala systemd License: MIT ++++++ python-libeconf.spec ++++++ --- /var/tmp/diff_new_pack.diLkjX/_old 2026-10-10 14:55:20.003825899 +0200 +++ /var/tmp/diff_new_pack.diLkjX/_new 2026-10-10 14:55:20.005825983 +0200 @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} %define skip_python39 1 Name: python-libeconf -Version: 0.8.4 +Version: 0.8.5 Release: 0 Summary: Python bindings for libeconf License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.diLkjX/_old 2026-10-10 14:55:20.164832631 +0200 +++ /var/tmp/diff_new_pack.diLkjX/_new 2026-10-10 14:55:20.173833007 +0200 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/libeconf.git</param> - <param name="changesrevision">047940855e9659ea8589d9091f4ee52aceb1bed3</param> + <param name="changesrevision">24a835b40ef1421489ff35fc93e44ec8d82f0389</param> </service> </servicedata> (No newline at EOF) ++++++ libeconf-0.8.4.tar.xz -> libeconf-0.8.5.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/CMakeLists.txt new/libeconf-0.8.5/CMakeLists.txt --- old/libeconf-0.8.4/CMakeLists.txt 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/CMakeLists.txt 2026-10-06 16:02:22.000000000 +0200 @@ -3,7 +3,7 @@ # Ensure built-in policies from CMake are used, (e.g. improved policies for macOS) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) -project(libeconf VERSION 0.8.4 +project(libeconf VERSION 0.8.5 DESCRIPTION "Enhanced config file parser, which merges config files placed in several locations into one." LANGUAGES C ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/NEWS new/libeconf-0.8.5/NEWS --- old/libeconf-0.8.4/NEWS 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/NEWS 2026-10-06 16:02:22.000000000 +0200 @@ -1,3 +1,6 @@ +Version 0.8.5 +* Fix a crash if sections are empty. + Version 0.8.4 * Cleanup man pages regarding memory allocation and README.md. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/bindings/python3/pyproject.toml new/libeconf-0.8.5/bindings/python3/pyproject.toml --- old/libeconf-0.8.4/bindings/python3/pyproject.toml 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/bindings/python3/pyproject.toml 2026-10-06 16:02:22.000000000 +0200 @@ -4,7 +4,7 @@ [project] name = "python-libeconf" -version = "0.8.4" +version = "0.8.5" description = "Python bindings for libeconf" authors = [{name="nkrapp", email="[email protected]"}] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/doc/man/libeconf.3 new/libeconf-0.8.5/doc/man/libeconf.3 --- old/libeconf-0.8.4/doc/man/libeconf.3 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/doc/man/libeconf.3 2026-10-06 16:02:22.000000000 +0200 @@ -1,4 +1,4 @@ -.TH "libeconf" 3 "Thu Apr 8 2021" "Version 0.8.4" "libeconf" \" -*- nroff -*- +.TH "libeconf" 3 "Thu Apr 8 2021" "Version 0.8.5" "libeconf" \" -*- nroff -*- .ad l .nh .SH NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/lib/mergefiles.c new/libeconf-0.8.5/lib/mergefiles.c --- old/libeconf-0.8.4/lib/mergefiles.c 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/lib/mergefiles.c 2026-10-06 16:02:22.000000000 +0200 @@ -57,8 +57,8 @@ if (uf && ef) { for (size_t i = 0; i <= uf->length; i++) { // Check if the group has changed in the last iteration - if (i == uf->length || - (i && strcmp(uf->file_entry[i].group, uf->file_entry[i - 1].group))) { + if ((i == uf->length && i > 0) || + (i && i < uf->length && strcmp(uf->file_entry[i].group, uf->file_entry[i - 1].group))) { for (size_t j = etc_start; j < ef->length; j++) { // Check for matching groups if (!strcmp(uf->file_entry[i - 1].group, ef->file_entry[j].group)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/meson.build new/libeconf-0.8.5/meson.build --- old/libeconf-0.8.4/meson.build 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/meson.build 2026-10-06 16:02:22.000000000 +0200 @@ -7,7 +7,7 @@ 'b_pie=true', 'warning_level=3',], license : 'MIT', - version : '0.8.4', + version : '0.8.5', ) cc = meson.get_compiler('c') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/tests/CMakeLists.txt new/libeconf-0.8.5/tests/CMakeLists.txt --- old/libeconf-0.8.4/tests/CMakeLists.txt 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/tests/CMakeLists.txt 2026-10-06 16:02:22.000000000 +0200 @@ -28,6 +28,7 @@ tst-merge3 tst-merge4 tst-merge5 + tst-merge6 tst-logindefs1 tst-logindefs2 tst-arguments1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/tests/meson.build new/libeconf-0.8.5/tests/meson.build --- old/libeconf-0.8.4/tests/meson.build 2026-07-22 16:19:00.000000000 +0200 +++ new/libeconf-0.8.5/tests/meson.build 2026-10-06 16:02:22.000000000 +0200 @@ -22,6 +22,8 @@ test('tst-merge4', tst_merge4_exe) tst_merge5_exe = executable('tst-merge5', 'tst-merge5.c', c_args: test_args, dependencies : libeconf_dep) test('tst-merge5', tst_merge5_exe) +tst_merge6_exe = executable('tst-merge6', 'tst-merge6.c', c_args: test_args, dependencies : libeconf_dep) +test('tst-merge6', tst_merge6_exe) tst_write_string_data_exe = executable('tst-write-string-data', 'tst-write-string-data.c', c_args: test_args, dependencies : libeconf_dep) test('tst-write-string-data', tst_write_string_data_exe) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/tests/tst-merge6-data/data1.conf new/libeconf-0.8.5/tests/tst-merge6-data/data1.conf --- old/libeconf-0.8.4/tests/tst-merge6-data/data1.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.8.5/tests/tst-merge6-data/data1.conf 2026-10-06 16:02:22.000000000 +0200 @@ -0,0 +1,5 @@ +# usr-provided defaults file: every key in [Server] is commented out, so +# this file parses with zero active key/value entries. +[Server] +#ListenAddress=0.0.0.0:8443 +#ListenPath=/report diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/tests/tst-merge6-data/data2.conf new/libeconf-0.8.5/tests/tst-merge6-data/data2.conf --- old/libeconf-0.8.4/tests/tst-merge6-data/data2.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.8.5/tests/tst-merge6-data/data2.conf 2026-10-06 16:02:22.000000000 +0200 @@ -0,0 +1,3 @@ +# etc drop-in overriding/adding real keys to the same group. +[Server] +ListenAddress=127.0.0.1:9443 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libeconf-0.8.4/tests/tst-merge6.c new/libeconf-0.8.5/tests/tst-merge6.c --- old/libeconf-0.8.4/tests/tst-merge6.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libeconf-0.8.5/tests/tst-merge6.c 2026-10-06 16:02:22.000000000 +0200 @@ -0,0 +1,86 @@ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <stdio.h> +#include <string.h> + +#include "libeconf.h" + +/* Test case: + * Merge a "usr" file whose only group has every key commented out (so it + * parses with zero key/value entries, but the group name is still known) + * with an "etc" file which adds a real key to that same group. + * + * This reproduces a crash seen in sd-report-collector: a shipped + * /usr/lib/<project>/<project>.conf with all keys commented out, merged + * with a /etc/<project>/<project>.conf.d/\*.conf drop-in adding real keys, + * segfaulted in merge_existing_groups() because of a size_t underflow + * (i - 1 with i == 0) when indexing into the usr file's (empty) entries. + * + * Application should not crash and should return the value from the etc + * (drop-in) file. +*/ + +static bool +check_string (econf_file *key_file, const char *group, const char *key, + const char *value) +{ + econf_err error; + + char *val_String; + if ((error = econf_getStringValue(key_file, group, key, &val_String))) + { + fprintf (stderr, "ERROR: reading (%s,%s): %s\n", group, key, econf_errString(error)); + return false; + } + printf ("reading (%s,%s): got '%s', expected '%s'\n", group, key, val_String, value?value:""); + if (strcmp(val_String, value?value:"") != 0) + { + fprintf (stderr, "ERROR: reading (%s,%s): expected '%s', got: '%s'\n", + group, key, value, val_String); + free(val_String); + return false; + } + free(val_String); + return true; +} + +int +main(void) +{ + econf_file *key_file_usr = NULL, *key_file_etc = NULL, *key_file_m = NULL; + econf_err error; + int retval = 0; + + error = econf_readFile (&key_file_usr, TESTSDIR"tst-merge6-data/data1.conf", "=", "#"); + if (error || key_file_usr == NULL) + { + fprintf (stderr, "ERROR: couldn't read data1.conf: %s\n", econf_errString(error)); + return 1; + } + error = econf_readFile (&key_file_etc, TESTSDIR"tst-merge6-data/data2.conf", "=", "#"); + if (error || key_file_etc == NULL) + { + fprintf (stderr, "ERROR: couldn't read data2.conf: %s\n", econf_errString(error)); + return 1; + } + + error = econf_mergeFiles (&key_file_m, key_file_usr, key_file_etc); + if (error || key_file_m == NULL) + { + fprintf (stderr, "ERROR: error merging configuration files: %s\n", econf_errString(error)); + return 1; + } + + if (!check_string (key_file_m, "Server", "ListenAddress", "127.0.0.1:9443")) retval = 1; + + if (key_file_usr) + econf_free (key_file_usr); + if (key_file_etc) + econf_free (key_file_etc); + if (key_file_m) + econf_free (key_file_m); + + return retval; +}
