diff --git a/README.md b/README.md index 841e483fe0b..6eb01469370 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ System and Service Manager [![CentOS CI - CentOS 8](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/buildStatus/icon?subject=CentOS%20CI%20-%20CentOS%208&job=upstream-centos8)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/job/upstream-centos8/)
[![CentOS CI - Arch](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/buildStatus/icon?subject=CentOS%20CI%20-%20Arch&job=upstream-vagrant-archlinux)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/job/upstream-vagrant-archlinux/)
[![CentOS CI - Arch (sanitizers)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/buildStatus/icon?subject=CentOS%20CI%20-%20Arch%20(sanitizers)&job=upstream-vagrant-archlinux-sanitizers)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/job/upstream-vagrant-archlinux-sanitizers/)
-[![CentOS CI - Rawhide (SELinux)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/buildStatus/icon?subject=CentOS%20CI%20-%20Rawhide%20(SELinux)&job=upstream-vagrant-rawhide-selinux)](https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/view/Upstream/job/upstream-vagrant-rawhide-selinux/)
[![Fossies codespell report](https://fossies.org/linux/test/systemd-main.tar.gz/codespell.svg)](https://fossies.org/linux/test/systemd-main.tar.gz/codespell.html)
[![Weblate](https://translate.fedoraproject.org/widgets/systemd/-/master/svg-badge.svg)](https://translate.fedoraproject.org/engage/systemd/)
[![Coverage Status](https://coveralls.io/repos/github/systemd/systemd/badge.svg?branch=main)](https://coveralls.io/github/systemd/systemd?branch=main)
diff --git a/src/fuzz/fuzz-calendarspec.c b/src/fuzz/fuzz-calendarspec.c index ea027b8f66e..573a48a48b4 100644 --- a/src/fuzz/fuzz-calendarspec.c +++ b/src/fuzz/fuzz-calendarspec.c @@ -15,7 +15,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (!getenv("SYSTEMD_LOG_LEVEL")) log_set_max_level(LOG_CRIT); - str = memdup_suffix0(data, size); + assert_se(str = memdup_suffix0(data, size)); size_t l1 = strlen(str); const char* usecs = l1 < size ? str + l1 + 1 : ""; diff --git a/src/fuzz/fuzz-time-util.c b/src/fuzz/fuzz-time-util.c index f1c95ae09b8..8e6cb8553b8 100644 --- a/src/fuzz/fuzz-time-util.c +++ b/src/fuzz/fuzz-time-util.c @@ -12,7 +12,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (!getenv("SYSTEMD_LOG_LEVEL")) log_set_max_level(LOG_CRIT); - str = memdup_suffix0(data, size); + assert_se(str = memdup_suffix0(data, size)); (void) parse_timestamp(str, &usec); (void) parse_sec(str, &usec); diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 1224654290c..f4ede985de7 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1203,11 +1203,12 @@ static sd_event_source *source_new(sd_event *e, bool floating, EventSourceType t assert(type < _SOURCE_EVENT_SOURCE_TYPE_MAX); assert(size_table[type] > 0); - /* We use expand_to_usable() here to tell gcc that it should consider this an object of the full - * size, even if we only allocate the initial part we need. */ - s = expand_to_usable(malloc0(size_table[type]), sizeof(sd_event_source)); + s = malloc0(size_table[type]); if (!s) return NULL; + /* We use expand_to_usable() here to tell gcc that it should consider this an object of the full + * size, even if we only allocate the initial part we need. */ + s = expand_to_usable(s, sizeof(sd_event_source)); /* Note: we cannot use compound initialization here, because sizeof(sd_event_source) is likely larger * than what we allocated here. */