Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/elogind-243.7/man/glib-event-glue.c Examining data/elogind-243.7/man/vtable-example.c Examining data/elogind-243.7/src/basic/MurmurHash2.c Examining data/elogind-243.7/src/basic/MurmurHash2.h Examining data/elogind-243.7/src/basic/alloc-util.c Examining data/elogind-243.7/src/basic/alloc-util.h Examining data/elogind-243.7/src/basic/audit-util.c Examining data/elogind-243.7/src/basic/audit-util.h Examining data/elogind-243.7/src/basic/build.h Examining data/elogind-243.7/src/basic/bus-label.c Examining data/elogind-243.7/src/basic/bus-label.h Examining data/elogind-243.7/src/basic/cap-list.c Examining data/elogind-243.7/src/basic/cap-list.h Examining data/elogind-243.7/src/basic/capability-util.c Examining data/elogind-243.7/src/basic/capability-util.h Examining data/elogind-243.7/src/basic/cgroup-util.c Examining data/elogind-243.7/src/basic/cgroup-util.h Examining data/elogind-243.7/src/basic/chattr-util.c Examining data/elogind-243.7/src/basic/chattr-util.h Examining data/elogind-243.7/src/basic/conf-files.c Examining data/elogind-243.7/src/basic/conf-files.h Examining data/elogind-243.7/src/basic/copy.c Examining data/elogind-243.7/src/basic/copy.h Examining data/elogind-243.7/src/basic/def.h Examining data/elogind-243.7/src/basic/dirent-util.c Examining data/elogind-243.7/src/basic/dirent-util.h Examining data/elogind-243.7/src/basic/env-file.c Examining data/elogind-243.7/src/basic/env-file.h Examining data/elogind-243.7/src/basic/env-util.c Examining data/elogind-243.7/src/basic/env-util.h Examining data/elogind-243.7/src/basic/errno-list.c Examining data/elogind-243.7/src/basic/errno-list.h Examining data/elogind-243.7/src/basic/errno-util.h Examining data/elogind-243.7/src/basic/escape.c Examining data/elogind-243.7/src/basic/escape.h Examining data/elogind-243.7/src/basic/extract-word.c Examining data/elogind-243.7/src/basic/extract-word.h Examining data/elogind-243.7/src/basic/fd-util.c Examining data/elogind-243.7/src/basic/fd-util.h Examining data/elogind-243.7/src/basic/fileio.c Examining data/elogind-243.7/src/basic/fileio.h Examining data/elogind-243.7/src/basic/format-util.c Examining data/elogind-243.7/src/basic/format-util.h Examining data/elogind-243.7/src/basic/fs-util.c Examining data/elogind-243.7/src/basic/fs-util.h Examining data/elogind-243.7/src/basic/gunicode.c Examining data/elogind-243.7/src/basic/gunicode.h Examining data/elogind-243.7/src/basic/hash-funcs.c Examining data/elogind-243.7/src/basic/hash-funcs.h Examining data/elogind-243.7/src/basic/hashmap.c Examining data/elogind-243.7/src/basic/hashmap.h Examining data/elogind-243.7/src/basic/hexdecoct.c Examining data/elogind-243.7/src/basic/hexdecoct.h Examining data/elogind-243.7/src/basic/hostname-util.c Examining data/elogind-243.7/src/basic/hostname-util.h Examining data/elogind-243.7/src/basic/io-util.c Examining data/elogind-243.7/src/basic/io-util.h Examining data/elogind-243.7/src/basic/khash.c Examining data/elogind-243.7/src/basic/khash.h Examining data/elogind-243.7/src/basic/label.c Examining data/elogind-243.7/src/basic/label.h Examining data/elogind-243.7/src/basic/limits-util.c Examining data/elogind-243.7/src/basic/limits-util.h Examining data/elogind-243.7/src/basic/list.h Examining data/elogind-243.7/src/basic/locale-util.c Examining data/elogind-243.7/src/basic/locale-util.h Examining data/elogind-243.7/src/basic/log.c Examining data/elogind-243.7/src/basic/log.h Examining data/elogind-243.7/src/basic/login-util.c Examining data/elogind-243.7/src/basic/login-util.h Examining data/elogind-243.7/src/basic/macro.h Examining data/elogind-243.7/src/basic/memfd-util.c Examining data/elogind-243.7/src/basic/memfd-util.h Examining data/elogind-243.7/src/basic/memory-util.c Examining data/elogind-243.7/src/basic/memory-util.h Examining data/elogind-243.7/src/basic/mempool.c Examining data/elogind-243.7/src/basic/mempool.h Examining data/elogind-243.7/src/basic/missing.h Examining data/elogind-243.7/src/basic/missing_audit.h Examining data/elogind-243.7/src/basic/missing_capability.h Examining data/elogind-243.7/src/basic/missing_drm.h Examining data/elogind-243.7/src/basic/missing_ethtool.h Examining data/elogind-243.7/src/basic/missing_fcntl.h Examining data/elogind-243.7/src/basic/missing_fib_rules.h Examining data/elogind-243.7/src/basic/missing_fs.h Examining data/elogind-243.7/src/basic/missing_if_bridge.h Examining data/elogind-243.7/src/basic/missing_if_link.h Examining data/elogind-243.7/src/basic/missing_if_tunnel.h Examining data/elogind-243.7/src/basic/missing_input.h Examining data/elogind-243.7/src/basic/missing_keyctl.h Examining data/elogind-243.7/src/basic/missing_magic.h Examining data/elogind-243.7/src/basic/missing_mman.h Examining data/elogind-243.7/src/basic/missing_network.h Examining data/elogind-243.7/src/basic/missing_prctl.h Examining data/elogind-243.7/src/basic/missing_random.h Examining data/elogind-243.7/src/basic/missing_resource.h Examining data/elogind-243.7/src/basic/missing_sched.h Examining data/elogind-243.7/src/basic/missing_securebits.h Examining data/elogind-243.7/src/basic/missing_socket.h Examining data/elogind-243.7/src/basic/missing_stat.h Examining data/elogind-243.7/src/basic/missing_stdlib.h Examining data/elogind-243.7/src/basic/missing_syscall.h Examining data/elogind-243.7/src/basic/missing_timerfd.h Examining data/elogind-243.7/src/basic/missing_type.h Examining data/elogind-243.7/src/basic/mkdir-label.c Examining data/elogind-243.7/src/basic/mkdir.c Examining data/elogind-243.7/src/basic/mkdir.h Examining data/elogind-243.7/src/basic/mountpoint-util.c Examining data/elogind-243.7/src/basic/mountpoint-util.h Examining data/elogind-243.7/src/basic/namespace-util.c Examining data/elogind-243.7/src/basic/namespace-util.h Examining data/elogind-243.7/src/basic/nulstr-util.c Examining data/elogind-243.7/src/basic/nulstr-util.h Examining data/elogind-243.7/src/basic/parse-printf-format.c Examining data/elogind-243.7/src/basic/parse-printf-format.h Examining data/elogind-243.7/src/basic/parse-util.c Examining data/elogind-243.7/src/basic/parse-util.h Examining data/elogind-243.7/src/basic/path-util.c Examining data/elogind-243.7/src/basic/path-util.h Examining data/elogind-243.7/src/basic/prioq.c Examining data/elogind-243.7/src/basic/prioq.h Examining data/elogind-243.7/src/basic/proc-cmdline.c Examining data/elogind-243.7/src/basic/proc-cmdline.h Examining data/elogind-243.7/src/basic/process-util.c Examining data/elogind-243.7/src/basic/process-util.h Examining data/elogind-243.7/src/basic/procfs-util.c Examining data/elogind-243.7/src/basic/procfs-util.h Examining data/elogind-243.7/src/basic/random-util.c Examining data/elogind-243.7/src/basic/random-util.h Examining data/elogind-243.7/src/basic/raw-clone.h Examining data/elogind-243.7/src/basic/refcnt.h Examining data/elogind-243.7/src/basic/rlimit-util.c Examining data/elogind-243.7/src/basic/rlimit-util.h Examining data/elogind-243.7/src/basic/rm-rf.c Examining data/elogind-243.7/src/basic/rm-rf.h Examining data/elogind-243.7/src/basic/selinux-util.c Examining data/elogind-243.7/src/basic/selinux-util.h Examining data/elogind-243.7/src/basic/set.h Examining data/elogind-243.7/src/basic/sigbus.c Examining data/elogind-243.7/src/basic/sigbus.h Examining data/elogind-243.7/src/basic/signal-util.c Examining data/elogind-243.7/src/basic/signal-util.h Examining data/elogind-243.7/src/basic/siphash24.c Examining data/elogind-243.7/src/basic/siphash24.h Examining data/elogind-243.7/src/basic/smack-util.c Examining data/elogind-243.7/src/basic/smack-util.h Examining data/elogind-243.7/src/basic/socket-util.c Examining data/elogind-243.7/src/basic/socket-util.h Examining data/elogind-243.7/src/basic/sort-util.h Examining data/elogind-243.7/src/basic/sparse-endian.h Examining data/elogind-243.7/src/basic/special.h Examining data/elogind-243.7/src/basic/stat-util.c Examining data/elogind-243.7/src/basic/stat-util.h Examining data/elogind-243.7/src/basic/static-destruct.h Examining data/elogind-243.7/src/basic/stdio-util.h Examining data/elogind-243.7/src/basic/string-table.c Examining data/elogind-243.7/src/basic/string-table.h Examining data/elogind-243.7/src/basic/string-util.c Examining data/elogind-243.7/src/basic/string-util.h Examining data/elogind-243.7/src/basic/strv.c Examining data/elogind-243.7/src/basic/strv.h Examining data/elogind-243.7/src/basic/strxcpyx.c Examining data/elogind-243.7/src/basic/strxcpyx.h Examining data/elogind-243.7/src/basic/syslog-util.c Examining data/elogind-243.7/src/basic/syslog-util.h Examining data/elogind-243.7/src/basic/terminal-util.c Examining data/elogind-243.7/src/basic/terminal-util.h Examining data/elogind-243.7/src/basic/time-util.c Examining data/elogind-243.7/src/basic/time-util.h Examining data/elogind-243.7/src/basic/tmpfile-util.c Examining data/elogind-243.7/src/basic/tmpfile-util.h Examining data/elogind-243.7/src/basic/umask-util.h Examining data/elogind-243.7/src/basic/unaligned.h Examining data/elogind-243.7/src/basic/unit-def.c Examining data/elogind-243.7/src/basic/unit-def.h Examining data/elogind-243.7/src/basic/unit-name.c Examining data/elogind-243.7/src/basic/unit-name.h Examining data/elogind-243.7/src/basic/user-util.c Examining data/elogind-243.7/src/basic/user-util.h Examining data/elogind-243.7/src/basic/utf8.c Examining data/elogind-243.7/src/basic/utf8.h Examining data/elogind-243.7/src/basic/util.c Examining data/elogind-243.7/src/basic/util.h Examining data/elogind-243.7/src/basic/virt.c Examining data/elogind-243.7/src/basic/virt.h Examining data/elogind-243.7/src/basic/xattr-util.c Examining data/elogind-243.7/src/basic/xattr-util.h Examining data/elogind-243.7/src/boot/efi/loader-features.h Examining data/elogind-243.7/src/busctl/busctl-introspect.c Examining data/elogind-243.7/src/busctl/busctl-introspect.h Examining data/elogind-243.7/src/busctl/busctl.c Examining data/elogind-243.7/src/cgroups-agent/cgroups-agent.c Examining data/elogind-243.7/src/core/cgroup.c Examining data/elogind-243.7/src/core/cgroup.h Examining data/elogind-243.7/src/core/mount-setup.c Examining data/elogind-243.7/src/core/mount-setup.h Examining data/elogind-243.7/src/journal/journal-def.h Examining data/elogind-243.7/src/journal/journal-file.h Examining data/elogind-243.7/src/journal/journal-internal.h Examining data/elogind-243.7/src/journal/journal-send.c Examining data/elogind-243.7/src/journal/mmap-cache.c Examining data/elogind-243.7/src/journal/mmap-cache.h Examining data/elogind-243.7/src/journal/sd-journal.c Examining data/elogind-243.7/src/libelogind/disable-mempool.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-common-errors.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-common-errors.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-container.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-container.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-control.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-control.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-convenience.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-creds.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-creds.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-dump.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-error.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-error.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-internal.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-internal.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-introspect.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-introspect.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-kernel.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-kernel.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-match.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-match.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-message.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-message.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-objects.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-protocol.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-signature.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-signature.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-slot.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-slot.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-socket.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-track.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-track.h Examining data/elogind-243.7/src/libelogind/sd-bus/bus-type.c Examining data/elogind-243.7/src/libelogind/sd-bus/bus-type.h Examining data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-address.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-error.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-introspect.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-match.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-queue-ref-cycle.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-server.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-signature.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-bus-vtable.c Examining data/elogind-243.7/src/libelogind/sd-bus/test-vtable-data.h Examining data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c Examining data/elogind-243.7/src/libelogind/sd-device/device-enumerator-private.h Examining data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c Examining data/elogind-243.7/src/libelogind/sd-device/device-internal.h Examining data/elogind-243.7/src/libelogind/sd-device/device-monitor-private.h Examining data/elogind-243.7/src/libelogind/sd-device/device-monitor.c Examining data/elogind-243.7/src/libelogind/sd-device/device-private.c Examining data/elogind-243.7/src/libelogind/sd-device/device-private.h Examining data/elogind-243.7/src/libelogind/sd-device/device-util.h Examining data/elogind-243.7/src/libelogind/sd-device/sd-device.c Examining data/elogind-243.7/src/libelogind/sd-device/test-sd-device-monitor.c Examining data/elogind-243.7/src/libelogind/sd-device/test-sd-device-thread.c Examining data/elogind-243.7/src/libelogind/sd-device/test-sd-device.c Examining data/elogind-243.7/src/libelogind/sd-event/event-source.h Examining data/elogind-243.7/src/libelogind/sd-event/sd-event.c Examining data/elogind-243.7/src/libelogind/sd-event/test-event.c Examining data/elogind-243.7/src/libelogind/sd-hwdb/hwdb-internal.h Examining data/elogind-243.7/src/libelogind/sd-hwdb/sd-hwdb.c Examining data/elogind-243.7/src/libelogind/sd-id128/id128-util.c Examining data/elogind-243.7/src/libelogind/sd-id128/id128-util.h Examining data/elogind-243.7/src/libelogind/sd-id128/sd-id128.c Examining data/elogind-243.7/src/libelogind/sd-login/sd-login.c Examining data/elogind-243.7/src/libelogind/sd-login/test-login.c Examining data/elogind-243.7/src/login/eloginctl.c Examining data/elogind-243.7/src/login/eloginctl.h Examining data/elogind-243.7/src/login/elogind-dbus.c Examining data/elogind-243.7/src/login/elogind-dbus.h Examining data/elogind-243.7/src/login/elogind.c Examining data/elogind-243.7/src/login/elogind.h Examining data/elogind-243.7/src/login/inhibit.c Examining data/elogind-243.7/src/login/loginctl.c Examining data/elogind-243.7/src/login/logind-acl.c Examining data/elogind-243.7/src/login/logind-acl.h Examining data/elogind-243.7/src/login/logind-action.c Examining data/elogind-243.7/src/login/logind-action.h Examining data/elogind-243.7/src/login/logind-brightness.c Examining data/elogind-243.7/src/login/logind-brightness.h Examining data/elogind-243.7/src/login/logind-button.c Examining data/elogind-243.7/src/login/logind-button.h Examining data/elogind-243.7/src/login/logind-core.c Examining data/elogind-243.7/src/login/logind-dbus.c Examining data/elogind-243.7/src/login/logind-dbus.h Examining data/elogind-243.7/src/login/logind-device.c Examining data/elogind-243.7/src/login/logind-device.h Examining data/elogind-243.7/src/login/logind-inhibit.c Examining data/elogind-243.7/src/login/logind-inhibit.h Examining data/elogind-243.7/src/login/logind-seat-dbus.c Examining data/elogind-243.7/src/login/logind-seat-dbus.h Examining data/elogind-243.7/src/login/logind-seat.c Examining data/elogind-243.7/src/login/logind-seat.h Examining data/elogind-243.7/src/login/logind-session-dbus.c Examining data/elogind-243.7/src/login/logind-session-dbus.h Examining data/elogind-243.7/src/login/logind-session-device.c Examining data/elogind-243.7/src/login/logind-session-device.h Examining data/elogind-243.7/src/login/logind-session.c Examining data/elogind-243.7/src/login/logind-session.h Examining data/elogind-243.7/src/login/logind-user-dbus.c Examining data/elogind-243.7/src/login/logind-user-dbus.h Examining data/elogind-243.7/src/login/logind-user.c Examining data/elogind-243.7/src/login/logind-user.h Examining data/elogind-243.7/src/login/logind-utmp.c Examining data/elogind-243.7/src/login/logind.c Examining data/elogind-243.7/src/login/logind.h Examining data/elogind-243.7/src/login/pam_elogind.c Examining data/elogind-243.7/src/login/sysfs-show.c Examining data/elogind-243.7/src/login/sysfs-show.h Examining data/elogind-243.7/src/login/test-inhibit.c Examining data/elogind-243.7/src/login/test-login-shared.c Examining data/elogind-243.7/src/login/test-login-tables.c Examining data/elogind-243.7/src/login/user-runtime-dir.c Examining data/elogind-243.7/src/login/user-runtime-dir.h Examining data/elogind-243.7/src/shared/acl-util.c Examining data/elogind-243.7/src/shared/acl-util.h Examining data/elogind-243.7/src/shared/bootspec.c Examining data/elogind-243.7/src/shared/bootspec.h Examining data/elogind-243.7/src/shared/bus-polkit.c Examining data/elogind-243.7/src/shared/bus-polkit.h Examining data/elogind-243.7/src/shared/bus-util.c Examining data/elogind-243.7/src/shared/bus-util.h Examining data/elogind-243.7/src/shared/clean-ipc.c Examining data/elogind-243.7/src/shared/clean-ipc.h Examining data/elogind-243.7/src/shared/conf-parser.c Examining data/elogind-243.7/src/shared/conf-parser.h Examining data/elogind-243.7/src/shared/dev-setup.c Examining data/elogind-243.7/src/shared/dev-setup.h Examining data/elogind-243.7/src/shared/efivars.c Examining data/elogind-243.7/src/shared/efivars.h Examining data/elogind-243.7/src/shared/enable-mempool.c Examining data/elogind-243.7/src/shared/exec-elogind.c Examining data/elogind-243.7/src/shared/exec-elogind.h Examining data/elogind-243.7/src/shared/exec-util.c Examining data/elogind-243.7/src/shared/exec-util.h Examining data/elogind-243.7/src/shared/fileio-label.c Examining data/elogind-243.7/src/shared/fileio-label.h Examining data/elogind-243.7/src/shared/format-table.c Examining data/elogind-243.7/src/shared/format-table.h Examining data/elogind-243.7/src/shared/fsck-util.h Examining data/elogind-243.7/src/shared/json-internal.h Examining data/elogind-243.7/src/shared/json.c Examining data/elogind-243.7/src/shared/json.h Examining data/elogind-243.7/src/shared/log-link.h Examining data/elogind-243.7/src/shared/main-func.h Examining data/elogind-243.7/src/shared/musl_missing.c Examining data/elogind-243.7/src/shared/musl_missing.h Examining data/elogind-243.7/src/shared/nsflags.c Examining data/elogind-243.7/src/shared/nsflags.h Examining data/elogind-243.7/src/shared/output-mode.c Examining data/elogind-243.7/src/shared/output-mode.h Examining data/elogind-243.7/src/shared/pager.c Examining data/elogind-243.7/src/shared/pager.h Examining data/elogind-243.7/src/shared/pe-header.h Examining data/elogind-243.7/src/shared/pretty-print.c Examining data/elogind-243.7/src/shared/pretty-print.h Examining data/elogind-243.7/src/shared/qsort_r_missing.c Examining data/elogind-243.7/src/shared/qsort_r_missing.h Examining data/elogind-243.7/src/shared/reboot-util.c Examining data/elogind-243.7/src/shared/reboot-util.h Examining data/elogind-243.7/src/shared/serialize.c Examining data/elogind-243.7/src/shared/serialize.h Examining data/elogind-243.7/src/shared/sleep-config.c Examining data/elogind-243.7/src/shared/sleep-config.h Examining data/elogind-243.7/src/shared/spawn-polkit-agent.c Examining data/elogind-243.7/src/shared/spawn-polkit-agent.h Examining data/elogind-243.7/src/shared/test-tables.h Examining data/elogind-243.7/src/shared/tests.c Examining data/elogind-243.7/src/shared/tests.h Examining data/elogind-243.7/src/shared/udev-util.c Examining data/elogind-243.7/src/shared/udev-util.h Examining data/elogind-243.7/src/shared/unit-file.c Examining data/elogind-243.7/src/shared/unit-file.h Examining data/elogind-243.7/src/shared/utmp-wtmp.c Examining data/elogind-243.7/src/shared/utmp-wtmp.h Examining data/elogind-243.7/src/shared/verbs.c Examining data/elogind-243.7/src/shared/verbs.h Examining data/elogind-243.7/src/shared/wireguard-netlink.h Examining data/elogind-243.7/src/shared/xml.c Examining data/elogind-243.7/src/shared/xml.h Examining data/elogind-243.7/src/sleep/sleep.c Examining data/elogind-243.7/src/sleep/sleep.h Examining data/elogind-243.7/src/systemd/_sd-common.h Examining data/elogind-243.7/src/systemd/sd-bus-protocol.h Examining data/elogind-243.7/src/systemd/sd-bus-vtable.h Examining data/elogind-243.7/src/systemd/sd-bus.h Examining data/elogind-243.7/src/systemd/sd-daemon.h Examining data/elogind-243.7/src/systemd/sd-device.h Examining data/elogind-243.7/src/systemd/sd-event.h Examining data/elogind-243.7/src/systemd/sd-hwdb.h Examining data/elogind-243.7/src/systemd/sd-id128.h Examining data/elogind-243.7/src/systemd/sd-journal.h Examining data/elogind-243.7/src/systemd/sd-login.h Examining data/elogind-243.7/src/systemd/sd-messages.h Examining data/elogind-243.7/src/test/test-alloc-util.c Examining data/elogind-243.7/src/test/test-bus-util.c Examining data/elogind-243.7/src/test/test-cgroup-cpu.c Examining data/elogind-243.7/src/test/test-cgroup-unit-default.c Examining data/elogind-243.7/src/test/test-cgroup.c Examining data/elogind-243.7/src/test/test-chase-symlinks.c Examining data/elogind-243.7/src/test/test-conf-files.c Examining data/elogind-243.7/src/test/test-conf-parser.c Examining data/elogind-243.7/src/test/test-copy.c Examining data/elogind-243.7/src/test/test-dev-setup.c Examining data/elogind-243.7/src/test/test-dlopen.c Examining data/elogind-243.7/src/test/test-ellipsize.c Examining data/elogind-243.7/src/test/test-env-file.c Examining data/elogind-243.7/src/test/test-escape.c Examining data/elogind-243.7/src/test/test-exec-util.c Examining data/elogind-243.7/src/test/test-extract-word.c Examining data/elogind-243.7/src/test/test-fd-util.c Examining data/elogind-243.7/src/test/test-format-table.c Examining data/elogind-243.7/src/test/test-format-util.c Examining data/elogind-243.7/src/test/test-fs-util.c Examining data/elogind-243.7/src/test/test-hash.c Examining data/elogind-243.7/src/test/test-hashmap-plain.c Examining data/elogind-243.7/src/test/test-hashmap.c Examining data/elogind-243.7/src/test/test-helper.h Examining data/elogind-243.7/src/test/test-hexdecoct.c Examining data/elogind-243.7/src/test/test-id128.c Examining data/elogind-243.7/src/test/test-io-util.c Examining data/elogind-243.7/src/test/test-ipcrm.c Examining data/elogind-243.7/src/test/test-json.c Examining data/elogind-243.7/src/test/test-list.c Examining data/elogind-243.7/src/test/test-locale-util.c Examining data/elogind-243.7/src/test/test-log.c Examining data/elogind-243.7/src/test/test-mountpoint-util.c Examining data/elogind-243.7/src/test/test-parse-util.c Examining data/elogind-243.7/src/test/test-path-util.c Examining data/elogind-243.7/src/test/test-pretty-print.c Examining data/elogind-243.7/src/test/test-prioq.c Examining data/elogind-243.7/src/test/test-proc-cmdline.c Examining data/elogind-243.7/src/test/test-process-util.c Examining data/elogind-243.7/src/test/test-procfs-util.c Examining data/elogind-243.7/src/test/test-random-util.c Examining data/elogind-243.7/src/test/test-selinux.c Examining data/elogind-243.7/src/test/test-set-disable-mempool.c Examining data/elogind-243.7/src/test/test-set.c Examining data/elogind-243.7/src/test/test-signal-util.c Examining data/elogind-243.7/src/test/test-siphash24.c Examining data/elogind-243.7/src/test/test-sizeof.c Examining data/elogind-243.7/src/test/test-stat-util.c Examining data/elogind-243.7/src/test/test-static-destruct.c Examining data/elogind-243.7/src/test/test-string-util.c Examining data/elogind-243.7/src/test/test-strip-tab-ansi.c Examining data/elogind-243.7/src/test/test-strxcpyx.c Examining data/elogind-243.7/src/test/test-umask-util.c Examining data/elogind-243.7/src/test/test-unaligned.c Examining data/elogind-243.7/src/test/test-unit-file.c Examining data/elogind-243.7/src/test/test-user-util.c Examining data/elogind-243.7/src/test/test-utf8.c Examining data/elogind-243.7/src/test/test-util.c Examining data/elogind-243.7/src/test/test-verbs.c Examining data/elogind-243.7/src/uaccess-command/uaccess-command.c Examining data/elogind-243.7/src/update-utmp/update-utmp.c Examining data/elogind-243.7/src/update-utmp/update-utmp.h FINAL RESULTS: data/elogind-243.7/src/basic/fs-util.c:302:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(procfs_path, m) < 0) data/elogind-243.7/src/test/test-exec-util.c:110:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:111:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:112:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(overridden, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:113:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(override, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:114:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(masked, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:115:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(masked2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:116:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(masked2e, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:117:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(mask2e, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:180:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:181:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:182:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name3, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:183:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(overridden, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:184:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(override, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:185:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(masked, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:265:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:266:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:267:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name3, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:323:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:324:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:325:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name3, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:396:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:397:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name2, 0755) == 0); data/elogind-243.7/src/test/test-exec-util.c:398:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. assert_se(chmod(name3, 0755) == 0); data/elogind-243.7/src/test/test-fs-util.c:163:27: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. assert_se(chown(p, UID_NOBODY, GID_NOBODY) >= 0); data/elogind-243.7/src/test/test-fs-util.c:275:27: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. assert_se(chown(q, UID_NOBODY, GID_NOBODY) >= 0); data/elogind-243.7/src/test/test-fs-util.c:278:27: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. assert_se(chown(p, UID_NOBODY, GID_NOBODY) >= 0); data/elogind-243.7/src/test/test-fs-util.c:281:27: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. assert_se(chown(q, 0, 0) >= 0); data/elogind-243.7/src/test/test-fs-util.c:288:27: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. assert_se(chown(p, 0, 0) >= 0); data/elogind-243.7/man/vtable-example.c:44:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(#x ": %m\n"); \ data/elogind-243.7/src/basic/capability-util.c:243:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. k = sscanf(p, "%" PRIu32 " %" PRIu32, &lo, &hi); data/elogind-243.7/src/basic/cgroup-util.c:150:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/proc/self/ns/cgroup", F_OK) < 0) { data/elogind-243.7/src/basic/cgroup-util.c:2827:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s + 1, n); data/elogind-243.7/src/basic/fd-util.c:396:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/proc/self/fd/", F_OK) < 0) data/elogind-243.7/src/basic/fs-util.c:653:39: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (errno != EROFS || access(filename, F_OK) >= 0) data/elogind-243.7/src/basic/fs-util.c:1191:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. r = access(p, mode); data/elogind-243.7/src/basic/khash.c:143:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char*) sa.alg.salg_name, algorithm); data/elogind-243.7/src/basic/log.c:702:16: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(buffer, sizeof buffer, format, ap); data/elogind-243.7/src/basic/log.c:757:16: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(b, LINE_MAX, format, ap); data/elogind-243.7/src/basic/log.c:800:16: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) snprintf(buffer, sizeof buffer, format, text, file, line, func); data/elogind-243.7/src/basic/log.c:969:24: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(buf, sizeof buf, format, aq); data/elogind-243.7/src/basic/log.c:1260:16: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(buffer, sizeof buffer, format, ap); data/elogind-243.7/src/basic/login-util.h:10:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access("/run/systemd/seats/", F_OK) >= 0; data/elogind-243.7/src/basic/macro.h:12:50: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define _printf_(a, b) __attribute__((__format__(printf, a, b))) data/elogind-243.7/src/basic/path-util.c:204:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, t); data/elogind-243.7/src/basic/path-util.c:611:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(name, X_OK) < 0) data/elogind-243.7/src/basic/path-util.c:649:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(j, X_OK) >= 0) { data/elogind-243.7/src/basic/path-util.h:119:47: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). path_simplify(strcpy(prefix, path), false); \ data/elogind-243.7/src/basic/path-util.h:128:47: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). path_simplify(strcpy(prefix, path), false); \ data/elogind-243.7/src/basic/path-util.h:155:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(_p, _path); \ data/elogind-243.7/src/basic/process-util.c:1484:9: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(path, l); data/elogind-243.7/src/basic/process-util.h:29:25: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((char*) _r_, "/proc/"PID_FMT"/" field, _pid_); \ data/elogind-243.7/src/basic/procfs-util.c:88:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ data/elogind-243.7/src/basic/procfs-util.c:94:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buffer, "%" PRIu64, limit); data/elogind-243.7/src/basic/smack-util.c:32:30: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. cached_use = access("/sys/fs/smackfs/", F_OK) >= 0; data/elogind-243.7/src/basic/socket-util.c:528:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/proc/net/if_inet6", F_OK) != 0) data/elogind-243.7/src/basic/stat-util.c:150:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path, W_OK) < 0 && errno == EROFS) data/elogind-243.7/src/basic/stdio-util.h:18:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) data/elogind-243.7/src/basic/strxcpyx.c:58:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. i = vsnprintf(*dest, size, src, va); data/elogind-243.7/src/basic/terminal-util.c:168:17: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/elogind-243.7/src/basic/terminal-util.c:215:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(text, ap); data/elogind-243.7/src/basic/terminal-util.c:735:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path, F_OK) < 0) { data/elogind-243.7/src/basic/time-util.c:312:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf + n, ".%06"PRI_USEC, t % USEC_PER_SEC); data/elogind-243.7/src/basic/time-util.c:342:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf + n, tm.tm_zone); data/elogind-243.7/src/basic/time-util.c:382:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT " years " USEC_FMT " months %s", data/elogind-243.7/src/basic/time-util.c:386:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT " months " USEC_FMT " days %s", data/elogind-243.7/src/basic/time-util.c:390:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT " weeks " USEC_FMT " days %s", data/elogind-243.7/src/basic/time-util.c:394:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT " days %s", d / USEC_PER_DAY, s); data/elogind-243.7/src/basic/time-util.c:399:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "h %s", data/elogind-243.7/src/basic/time-util.c:402:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "h " USEC_FMT "min %s", data/elogind-243.7/src/basic/time-util.c:406:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "min %s", data/elogind-243.7/src/basic/time-util.c:409:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "min " USEC_FMT "s %s", data/elogind-243.7/src/basic/time-util.c:413:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "s %s", data/elogind-243.7/src/basic/time-util.c:416:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT "ms %s", data/elogind-243.7/src/basic/time-util.c:419:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, l, USEC_FMT"us %s", data/elogind-243.7/src/basic/unit-name.c:234:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mempcpy(s, n, a), suffix); data/elogind-243.7/src/basic/unit-name.c:471:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mempcpy(mempcpy(s, f, a + 1), i, b), e); data/elogind-243.7/src/basic/unit-name.c:497:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mempcpy(s, f, a + 1), e); data/elogind-243.7/src/basic/unit-name.c:657:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(s, suffix); data/elogind-243.7/src/basic/user-util.c:791:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. cache = access("/etc/elogind/dont-synthesize-nobody", F_OK) < 0; data/elogind-243.7/src/basic/user-util.h:100:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access("/proc/self/uid_map", F_OK) >= 0; data/elogind-243.7/src/basic/util.c:108:35: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. saved_in_initrd = access("/etc/initrd-release", F_OK) >= 0 && data/elogind-243.7/src/basic/virt.c:190:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/proc/xen", F_OK) < 0) { data/elogind-243.7/src/basic/virt.c:463:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/proc/vz", F_OK) >= 0 && data/elogind-243.7/src/basic/virt.c:464:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access("/proc/bc", F_OK) < 0) { data/elogind-243.7/src/basic/virt.c:587:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. r = sscanf(buf, "%"PRIu32" %"PRIu32" %"PRIu32, &a, &b, &c); data/elogind-243.7/src/busctl/busctl.c:711:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, "%" PRIi64, basic.s64); data/elogind-243.7/src/busctl/busctl.c:715:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, "%" PRIu64, basic.u64); data/elogind-243.7/src/core/cgroup.c:332:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, data/elogind-243.7/src/core/cgroup.c:537:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, data/elogind-243.7/src/core/cgroup.c:666:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, data/elogind-243.7/src/core/mount-setup.c:213:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(p->where, W_OK) < 0) { data/elogind-243.7/src/journal/journal-send.c:105:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer+8, sizeof(buffer) - 8, format, ap); data/elogind-243.7/src/journal/journal-send.c:531:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer+8, sizeof(buffer) - 8, format, ap); data/elogind-243.7/src/journal/journal-send.c:554:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), format, ap); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:58:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:80:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " Cookie=%" PRIu64, BUS_MESSAGE_COOKIE(m)); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:83:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " ReplyCookie=%" PRIu64, m->reply_cookie); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:109:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " Monotonic="USEC_FMT, m->monotonic); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:111:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " Realtime="USEC_FMT, m->realtime); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:113:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " SequenceNumber=%"PRIu64, m->seqnum); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:305:33: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, terse ? "\n " : "\n "); data/elogind-243.7/src/libelogind/sd-bus/bus-dump.c:396:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, "%s" GID_FMT, i > 0 ? " " : "", c->supplementary_gids[i]); data/elogind-243.7/src/libelogind/sd-bus/bus-internal.h:403:32: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). for (char *_slash = ({ strcpy((prefix), (path)); streq((prefix), "/") ? NULL : strrchr((prefix), '/'); }) ; \ data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:972:25: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(b->exec_path, b->exec_argv); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:975:25: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(b->exec_path, (char**) argv); data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:498:24: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(syspath, "%s%s", path, dent->d_name); data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:802:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/sys/subsystem", F_OK) >= 0) { data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:944:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/sys/subsystem", F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:129:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access("/run/udev/control", F_OK) < 0 && data/elogind-243.7/src/libelogind/sd-device/sd-device.c:183:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. r = access(path, F_OK); data/elogind-243.7/src/libelogind/sd-device/sd-device.c:261:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:265:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:269:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:273:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:286:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:290:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:305:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:309:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:313:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:317:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(syspath, F_OK) >= 0) data/elogind-243.7/src/libelogind/sd-login/test-login.c:26:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*buf + pos, "%s"UID_FMT"%n", k > 0 ? " " : "", uids[k], &inc); data/elogind-243.7/src/login/elogind-dbus.c:129:17: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(helper, helper, NULL); data/elogind-243.7/src/login/elogind.c:79:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(ELOGIND_PID_FILE, F_OK) == 0) data/elogind-243.7/src/login/inhibit.c:325:25: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(arguments[0], arguments); data/elogind-243.7/src/login/loginctl.c:539:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("\t Leader: %"PRIu32, i.leader); data/elogind-243.7/src/login/logind-action.c:132:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. supported = access(KEXEC, X_OK) >= 0; data/elogind-243.7/src/login/logind-dbus.c:2787:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/run/systemd/reboot-to-firmware-setup", F_OK) < 0) { data/elogind-243.7/src/login/logind-seat.c:140:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, data/elogind-243.7/src/login/logind-user.c:581:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(p, F_OK) < 0) { data/elogind-243.7/src/login/logind.c:838:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/dev/tty0", F_OK) < 0) data/elogind-243.7/src/login/pam_elogind.c:230:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(s, F_OK) < 0) data/elogind-243.7/src/shared/bootspec.c:713:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/run/boot-loader-entries/", F_OK) >= 0) data/elogind-243.7/src/shared/bootspec.c:1022:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (void) access(trigger, F_OK); data/elogind-243.7/src/shared/bus-util.c:325:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/elogind-243.7/src/shared/clean-ipc.c:72:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(line, "%*i %i %*o %*u " PID_FMT " " PID_FMT " %u " UID_FMT " " GID_FMT " " UID_FMT " " GID_FMT, data/elogind-243.7/src/shared/clean-ipc.c:134:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(line, "%*i %i %*o %*u " UID_FMT " " GID_FMT " " UID_FMT " " GID_FMT, data/elogind-243.7/src/shared/clean-ipc.c:194:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(line, "%*i %i %*o %*u %*u " PID_FMT " " PID_FMT " " UID_FMT " " GID_FMT " " UID_FMT " " GID_FMT, data/elogind-243.7/src/shared/clean-ipc.c:353:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fn+1, de->d_name); data/elogind-243.7/src/shared/dev-setup.c:35:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(j, F_OK) < 0) data/elogind-243.7/src/shared/efivars.c:82:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access("/sys/firmware/efi/", F_OK) >= 0; data/elogind-243.7/src/shared/efivars.c:232:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(p, R_OK) < 0) data/elogind-243.7/src/shared/efivars.c:806:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(p, SD_ID128_UUID_FORMAT_STR, data/elogind-243.7/src/shared/exec-util.c:66:17: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(path, argv); data/elogind-243.7/src/shared/format-table.c:1281:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIi8, d->int8); data/elogind-243.7/src/shared/format-table.c:1293:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIi16, d->int16); data/elogind-243.7/src/shared/format-table.c:1305:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIi32, d->int32); data/elogind-243.7/src/shared/format-table.c:1317:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIi64, d->int64); data/elogind-243.7/src/shared/format-table.c:1341:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIu8, d->uint8); data/elogind-243.7/src/shared/format-table.c:1353:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIu16, d->uint16); data/elogind-243.7/src/shared/format-table.c:1365:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIu32, d->uint32); data/elogind-243.7/src/shared/format-table.c:1377:17: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(p, "%" PRIu64, d->uint64); data/elogind-243.7/src/shared/json.c:126:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s->name, name); data/elogind-243.7/src/shared/json.c:441:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(a->string, s); data/elogind-243.7/src/shared/json.c:1334:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, "%" PRIdMAX, json_variant_integer(v)); data/elogind-243.7/src/shared/json.c:1344:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, "%" PRIuMAX, json_variant_unsigned(v)); data/elogind-243.7/src/shared/json.c:3163:16: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) vsnprintf(buffer, sizeof buffer, format, ap); data/elogind-243.7/src/shared/pager.c:175:25: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(pager_args[0], pager_args); data/elogind-243.7/src/shared/pager.c:192:25: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(exe, exe, NULL); data/elogind-243.7/src/shared/pager.c:290:17: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], (char**) args); data/elogind-243.7/src/shared/serialize.c:65:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. k = vsnprintf(buf, sizeof(buf), format, ap); data/elogind-243.7/src/shared/sleep-config.c:111:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/sys/power/state", W_OK) < 0) data/elogind-243.7/src/shared/sleep-config.c:143:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/sys/power/disk", W_OK) < 0) { data/elogind-243.7/src/shared/tests.c:67:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(env, F_OK) < 0) { data/elogind-243.7/src/shared/tests.c:84:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(env, F_OK) < 0) { data/elogind-243.7/src/sleep/sleep.c:89:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/sys/power/resume_offset", W_OK) < 0) { data/elogind-243.7/src/systemd/_sd-common.h:30:56: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define _sd_printf_(a,b) __attribute__((__format__(printf, a, b))) data/elogind-243.7/src/test/test-copy.c:123:27: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. assert_se(access(f, F_OK) == 0); data/elogind-243.7/src/test/test-exec-util.c:125:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. assert_se(access("it_works", F_OK) >= 0); data/elogind-243.7/src/test/test-exec-util.c:126:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. assert_se(access("failed", F_OK) < 0); data/elogind-243.7/src/test/test-exec-util.c:129:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. assert_se(access("it_works2", F_OK) >= 0); data/elogind-243.7/src/test/test-exec-util.c:130:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. assert_se(access("failed", F_OK) < 0); data/elogind-243.7/src/test/test-fs-util.c:733:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(x, F_OK) < 0) { data/elogind-243.7/src/test/test-fs-util.c:744:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(w, F_OK) < 0) { data/elogind-243.7/src/test/test-pretty-print.c:33:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("/etc/fstab", R_OK) >= 0) data/elogind-243.7/src/basic/env-util.c:461:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return getenv(t); data/elogind-243.7/src/basic/env-util.c:745:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv(p); data/elogind-243.7/src/basic/locale-util.c:305:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !getenv("LC_ALL") && data/elogind-243.7/src/basic/locale-util.c:306:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !getenv("LC_CTYPE") && data/elogind-243.7/src/basic/locale-util.c:307:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !getenv("LANG"); data/elogind-243.7/src/basic/locale-util.c:323:48: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !STRPTR_IN_SET(getenv("TERM"), "dumb", "linux"); data/elogind-243.7/src/basic/log.c:1130:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("SYSTEMD_LOG_TARGET"); data/elogind-243.7/src/basic/log.c:1134:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("SYSTEMD_LOG_LEVEL"); data/elogind-243.7/src/basic/log.c:1138:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("SYSTEMD_LOG_COLOR"); data/elogind-243.7/src/basic/log.c:1142:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("SYSTEMD_LOG_LOCATION"); data/elogind-243.7/src/basic/namespace-util.c:119:21: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(".") < 0) data/elogind-243.7/src/basic/path-util.c:627:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PATH"); data/elogind-243.7/src/basic/process-util.c:820:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv(field); data/elogind-243.7/src/basic/random-util.c:315:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(x); data/elogind-243.7/src/basic/terminal-util.c:806:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("COLUMNS"); data/elogind-243.7/src/basic/terminal-util.c:840:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("LINES"); data/elogind-243.7/src/basic/terminal-util.c:1193:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("TERM"); data/elogind-243.7/src/basic/terminal-util.c:1263:63: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cached_underline_enabled = !streq_ptr(getenv("TERM"), "linux"); data/elogind-243.7/src/basic/virt.c:485:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("container"); data/elogind-243.7/src/busctl/busctl.c:2364:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hH:M:qj", options, NULL)) >= 0) data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:47:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("LISTEN_PID"); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:63:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("LISTEN_FDS"); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:102:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("LISTEN_FDNAMES"); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:475:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("NOTIFY_SOCKET"); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:629:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s = getenv("WATCHDOG_USEC"); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:641:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("WATCHDOG_PID"); data/elogind-243.7/src/login/inhibit.c:217:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0) data/elogind-243.7/src/login/loginctl.c:1507:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hp:als:H:M:n:o:", options, NULL)) >= 0) data/elogind-243.7/src/login/loginctl.c:1509:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "hp:als:H:M:n:o:ci", options, NULL)) >= 0) data/elogind-243.7/src/login/logind-core.c:137:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* logind_conf = getenv("ELOGIND_CONF_FILE"); data/elogind-243.7/src/shared/bootspec.c:1170:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv("SYSTEMD_ESP_PATH"); data/elogind-243.7/src/shared/bootspec.c:1398:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv("SYSTEMD_XBOOTLDR_PATH"); data/elogind-243.7/src/shared/musl_missing.h:42:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. (issetugid() ? NULL : getenv(name)) data/elogind-243.7/src/shared/pager.c:103:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pager = getenv("SYSTEMD_PAGER"); data/elogind-243.7/src/shared/pager.c:105:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pager = getenv("PAGER"); data/elogind-243.7/src/shared/pager.c:130:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. less_opts = getenv("SYSTEMD_LESS"); data/elogind-243.7/src/shared/pager.c:159:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. less_charset = getenv("SYSTEMD_LESSCHARSET"); data/elogind-243.7/src/shared/tests.c:64:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv("SYSTEMD_TEST_DATA"); data/elogind-243.7/src/shared/tests.c:81:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv("SYSTEMD_CATALOG_DIR"); data/elogind-243.7/src/shared/utmp-wtmp.c:42:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("RUNLEVEL"); data/elogind-243.7/src/shared/utmp-wtmp.c:49:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. e = getenv("PREVLEVEL"); data/elogind-243.7/src/sleep/sleep.c:456:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) data/elogind-243.7/src/test/test-chase-symlinks.c:38:21: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) data/elogind-243.7/src/test/test-exec-util.c:332:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. old = getenv("PATH"); data/elogind-243.7/src/test/test-fs-util.c:454:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. t = getenv("TMPDIR"); data/elogind-243.7/src/test/test-fs-util.c:460:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. t = getenv("TEMP"); data/elogind-243.7/src/test/test-fs-util.c:466:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. t = getenv("TMP"); data/elogind-243.7/src/test/test-fs-util.c:480:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. assert_se(streq(getenv("TMPDIR"), "/tmp")); data/elogind-243.7/src/test/test-fs-util.c:486:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. assert_se(streq(getenv("TMPDIR"), "/88_does_not_exist_88")); data/elogind-243.7/src/test/test-fs-util.c:493:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. assert_se(streq(getenv("TMPDIR"), tmpdir_backup)); data/elogind-243.7/src/test/test-fs-util.c:498:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. assert_se(streq(getenv("TEMP"), temp_backup)); data/elogind-243.7/src/test/test-fs-util.c:503:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. assert_se(streq(getenv("TMP"), tmp_backup)); data/elogind-243.7/src/test/test-prioq.c:21:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(0); data/elogind-243.7/src/test/test-prioq.c:67:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(0); data/elogind-243.7/src/basic/alloc-util.c:20:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, p, l); data/elogind-243.7/src/basic/alloc-util.h:69:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(_q_, p, _l_); \ data/elogind-243.7/src/basic/alloc-util.h:79:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(_q_, p, _l_); \ data/elogind-243.7/src/basic/cgroup-util.c:60:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(fs, "re"); data/elogind-243.7/src/basic/cgroup-util.c:573:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[strlen(pto) + 1]; data/elogind-243.7/src/basic/cgroup-util.c:857:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[DECIMAL_STR_MAX(pid_t) + 2]; data/elogind-243.7/src/basic/cgroup-util.c:898:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[strlen(path) + 1]; data/elogind-243.7/src/basic/cgroup-util.c:1548:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[n+1], *c; data/elogind-243.7/src/basic/cgroup-util.c:1550:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, p, n); data/elogind-243.7/src/basic/cgroup-util.c:1633:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[n - 8 - 6 + 1]; data/elogind-243.7/src/basic/cgroup-util.c:1635:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, p + 8, n - 8 - 6); data/elogind-243.7/src/basic/cgroup-util.c:1670:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[n - 5 - 8 + 1]; data/elogind-243.7/src/basic/cgroup-util.c:1672:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, p + 5, n - 5 - 8); data/elogind-243.7/src/basic/cgroup-util.c:2122:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char n[dash - p + sizeof(".slice")]; data/elogind-243.7/src/basic/cgroup-util.c:2136:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stpncpy(n, p, dash - p), ".slice"); data/elogind-243.7/src/basic/cgroup-util.c:2260:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret_values, v, sizeof(char*) * n); data/elogind-243.7/src/basic/cgroup-util.c:2481:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s + n + space, k, l); data/elogind-243.7/src/basic/cgroup-util.c:2824:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[1 + strlen(n) + 1]; data/elogind-243.7/src/basic/cgroup-util.c:2830:37: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(fs, "we"); data/elogind-243.7/src/basic/cgroup-util.c:3057:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const cgroup_controller_table[_CGROUP_CONTROLLER_MAX] = { data/elogind-243.7/src/basic/chattr-util.c:61:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); data/elogind-243.7/src/basic/chattr-util.c:92:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); data/elogind-243.7/src/basic/copy.c:779:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdf = open(from, O_RDONLY|O_CLOEXEC|O_NOCTTY); data/elogind-243.7/src/basic/copy.c:808:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdt = open(to, flags|O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, mode); data/elogind-243.7/src/basic/copy.c:862:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdt = open(t, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|O_WRONLY|O_CLOEXEC, 0600); data/elogind-243.7/src/basic/env-util.c:720:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret + k, m, q * sizeof(char*)); data/elogind-243.7/src/basic/escape.c:308:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r, prefix, pl); data/elogind-243.7/src/basic/escape.c:433:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ans + off, "...", c); data/elogind-243.7/src/basic/fd-util.c:387:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/fd-util.c:483:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open("/dev/null", O_RDONLY|O_CLOEXEC|O_NOCTTY); data/elogind-243.7/src/basic/fd-util.c:551:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/shm", O_RDWR|O_TMPFILE|O_CLOEXEC, 0500); data/elogind-243.7/src/basic/fd-util.c:582:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open(pattern, O_RDONLY|O_CLOEXEC); data/elogind-243.7/src/basic/fd-util.c:861:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). null_fd = open("/dev/null", (null_readable && null_writable ? O_RDWR : data/elogind-243.7/src/basic/fd-util.c:944:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/fd-util.c:955:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). new_fd = open(procfs_path, flags); data/elogind-243.7/src/basic/fileio.c:36:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path, options); data/elogind-243.7/src/basic/fileio.c:204:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY | ((flags & WRITE_STRING_FILE_NOFOLLOW) ? O_NOFOLLOW : 0)); data/elogind-243.7/src/basic/fileio.c:603:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(p, mode); data/elogind-243.7/src/basic/fileio.c:626:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, mode); data/elogind-243.7/src/basic/fileio.c:648:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, mode); data/elogind-243.7/src/basic/fileio.c:698:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ln[DECIMAL_STR_MAX(n)+2]; data/elogind-243.7/src/basic/format-util.c:8:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]) { data/elogind-243.7/src/basic/format-util.c:8:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]) { data/elogind-243.7/src/basic/format-util.h:75:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]); data/elogind-243.7/src/basic/format-util.h:75:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]); data/elogind-243.7/src/basic/fs-util.c:226:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_PATH|O_CLOEXEC|O_NOFOLLOW); /* Let's acquire an O_PATH fd, as precaution to change data/elogind-243.7/src/basic/fs-util.c:295:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/fs-util.c:331:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fdpath[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/fs-util.c:348:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_PATH|O_CLOEXEC|O_NOFOLLOW); data/elogind-243.7/src/basic/fs-util.c:355:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, IN_SET(mode, 0, MODE_INVALID) ? 0644 : mode); data/elogind-243.7/src/basic/fs-util.c:660:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/basic/fs-util.c:788:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open(path, O_PATH|O_CLOEXEC|((flags & CHASE_NOFOLLOW) ? O_NOFOLLOW : 0)); data/elogind-243.7/src/basic/fs-util.c:814:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/", O_CLOEXEC|O_NOFOLLOW|O_PATH); data/elogind-243.7/src/basic/fs-util.c:966:38: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(root ?: "/", O_CLOEXEC|O_NOFOLLOW|O_PATH); data/elogind-243.7/src/basic/fs-util.c:1079:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open(path, open_flags); data/elogind-243.7/src/basic/fs-util.c:1107:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/fs-util.c:1185:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char p[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(fd) + 1]; data/elogind-243.7/src/basic/fs-util.c:1330:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). opened_fd = open(".", O_RDONLY|O_DIRECTORY|O_CLOEXEC); data/elogind-243.7/src/basic/fs-util.c:1388:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(parent, flags, mode); data/elogind-243.7/src/basic/gunicode.c:101:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char utf8_skip_data[256] = { data/elogind-243.7/src/basic/gunicode.h:15:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char utf8_skip_data[256]; data/elogind-243.7/src/basic/hashmap.c:374:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(hash_key, current, sizeof(current)); data/elogind-243.7/src/basic/hashmap.c:474:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(e_to, e_from, hashmap_type_info[h->type].entry_size); data/elogind-243.7/src/basic/hashmap.c:1102:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_storage, h->direct.storage, data/elogind-243.7/src/basic/hexdecoct.c:39:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char table[16] = "0123456789abcdef"; data/elogind-243.7/src/basic/hexdecoct.c:172:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char table[32] = "0123456789" data/elogind-243.7/src/basic/hexdecoct.c:523:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" data/elogind-243.7/src/basic/hexdecoct.c:636:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, x + width * line, act); data/elogind-243.7/src/basic/hostname-util.c:220:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[HOST_NAME_MAX + 1] = {}; data/elogind-243.7/src/basic/hostname-util.c:313:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "re"); data/elogind-243.7/src/basic/io-util.c:27:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/elogind-243.7/src/basic/locale-util.c:108:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/usr/lib/locale/locale-archive", O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/locale-util.c:396:28: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void locale_variables_free(char *l[_VARIABLE_LC_MAX]) { data/elogind-243.7/src/basic/locale-util.c:407:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * const locale_variable_table[_VARIABLE_LC_MAX] = { data/elogind-243.7/src/basic/log.c:113:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). kmsg_fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/log.c:351:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char location[256], prefix[1 + DECIMAL_STR_MAX(int) + 2]; data/elogind-243.7/src/basic/log.c:414:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header_priority[2 + DECIMAL_STR_MAX(int) + 1], data/elogind-243.7/src/basic/log.c:474:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header_priority[2 + DECIMAL_STR_MAX(int) + 1], data/elogind-243.7/src/basic/log.c:557:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[LINE_MAX]; data/elogind-243.7/src/basic/log.c:693:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINE_MAX]; data/elogind-243.7/src/basic/log.c:793:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[LINE_MAX]; data/elogind-243.7/src/basic/log.c:901:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/elogind-243.7/src/basic/log.c:923:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[LINE_MAX]; data/elogind-243.7/src/basic/log.c:1021:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[LINE_MAX]; data/elogind-243.7/src/basic/log.c:1201:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const log_target_table[_LOG_TARGET_MAX] = { data/elogind-243.7/src/basic/log.c:1249:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINE_MAX]; data/elogind-243.7/src/basic/macro.h:355:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char x[(expr) ? 0 : -1]; \ data/elogind-243.7/src/basic/memfd-util.c:27:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pr[17] = {}; data/elogind-243.7/src/basic/memory-util.h:20:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, n); data/elogind-243.7/src/basic/missing_socket.h:15:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char svm_zero[sizeof(struct sockaddr) - data/elogind-243.7/src/basic/missing_syscall.h:170:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char f_handle[0]; data/elogind-243.7/src/basic/mkdir.c:66:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char u[DECIMAL_STR_MAX(uid_t)] = "-", g[DECIMAL_STR_MAX(gid_t)] = "-"; data/elogind-243.7/src/basic/mkdir.c:125:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[strlen(path) + 1]; data/elogind-243.7/src/basic/mkdir.c:134:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, path, e - path); data/elogind-243.7/src/basic/mountpoint-util.c:91:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[STRLEN("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/namespace-util.c:23:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mntnsfd = open(mntns, O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/namespace-util.c:32:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pidnsfd = open(pidns, O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/namespace-util.c:41:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netnsfd = open(netns, O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/namespace-util.c:50:28: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). usernsfd = open(userns, O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/basic/namespace-util.c:59:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rfd = open(root, O_RDONLY|O_NOCTTY|O_CLOEXEC|O_DIRECTORY); data/elogind-243.7/src/basic/path-util.c:954:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mempcpy(ret, path, e + 1 - path), filename, k + 1); data/elogind-243.7/src/basic/process-util.c:1448:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/tty", O_WRONLY); data/elogind-243.7/src/basic/process-util.c:1489:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/process-util.c:1491:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(t, "%i", value); data/elogind-243.7/src/basic/procfs-util.c:62:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/basic/procfs-util.c:210:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/meminfo", "re"); data/elogind-243.7/src/basic/random-util.c:197:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &u, m); data/elogind-243.7/src/basic/random-util.c:273:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY); data/elogind-243.7/src/basic/rm-rf.c:190:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); data/elogind-243.7/src/basic/selinux-util.c:82:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timespan[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/basic/selinux-util.c:113:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/selinux-util.c:126:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); data/elogind-243.7/src/basic/signal-util.c:215:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static thread_local char buf[STRLEN("RTMIN+") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/basic/siphash24.h:30:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static inline uint64_t siphash24_string(const char *s, const uint8_t k[static 16]) { data/elogind-243.7/src/basic/smack-util.c:128:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; data/elogind-243.7/src/basic/smack-util.c:226:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(abspath, O_NOFOLLOW|O_CLOEXEC|O_PATH); data/elogind-243.7/src/basic/socket-util.c:109:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a->sockaddr.un.sun_path, s, l); data/elogind-243.7/src/basic/socket-util.c:125:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a->sockaddr.un.sun_path+1, s+1, l); data/elogind-243.7/src/basic/socket-util.c:650:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char a[INET6_ADDRSTRLEN]; data/elogind-243.7/src/basic/socket-util.c:783:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[NI_MAXHOST], *ret; data/elogind-243.7/src/basic/socket-util.c:1100:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); data/elogind-243.7/src/basic/socket-util.c:1378:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret->sun_path + 1, path + 1, l); /* copy *with* trailing NUL byte */ data/elogind-243.7/src/basic/socket-util.c:1385:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret->sun_path, path, l + 1); /* copy *with* trailing NUL byte */ data/elogind-243.7/src/basic/socket-util.c:1403:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifname[IF_NAMESIZE + 1]; data/elogind-243.7/src/basic/stat-util.c:192:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH); data/elogind-243.7/src/basic/stat-util.c:238:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH); data/elogind-243.7/src/basic/string-util.c:148:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char quotechars[2] = {*current, '\0'}; data/elogind-243.7/src/basic/string-util.c:202:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r, s, a); data/elogind-243.7/src/basic/string-util.c:203:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r+a, suffix, b); data/elogind-243.7/src/basic/string-util.c:499:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, s, x); data/elogind-243.7/src/basic/string-util.c:502:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t + x + 3, s + old_length - suffix_len, suffix_len); data/elogind-243.7/src/basic/string-util.c:598:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(e, s, len); data/elogind-243.7/src/basic/string-util.c:600:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(e + len + 3, j, len2); data/elogind-243.7/src/basic/string-util.c:624:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char four[4]; data/elogind-243.7/src/basic/string-util.c:636:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + i, four, w); data/elogind-243.7/src/basic/string-util.c:747:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { data/elogind-243.7/src/basic/string-util.c:747:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) { data/elogind-243.7/src/basic/string-util.h:185:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]); data/elogind-243.7/src/basic/string-util.h:185:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]); data/elogind-243.7/src/basic/string-util.h:254:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (ascii_tolower(((char *)p)[i]) != ascii_tolower(token[i])) data/elogind-243.7/src/basic/strv.c:702:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(m + n, *i, z + 1); data/elogind-243.7/src/basic/syslog-util.c:57:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const log_facility_unshifted_table[LOG_NFACILITIES] = { data/elogind-243.7/src/basic/terminal-util.c:329:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(name, mode, 0); data/elogind-243.7/src/basic/terminal-util.c:492:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/basic/terminal-util.c:888:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX], *c; /* PATH_MAX is counted *with* the trailing NUL byte */ data/elogind-243.7/src/basic/time-util.c:289:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "--- XXXX-XX-XX XX:XX:XX"); data/elogind-243.7/src/basic/time-util.c:300:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, weekdays[tm.tm_wday], 4); data/elogind-243.7/src/basic/time-util.c:323:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf + n, " UTC"); data/elogind-243.7/src/basic/time-util.c:1230:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/usr/share/zoneinfo/zone1970.tab", "re"); data/elogind-243.7/src/basic/time-util.c:1289:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/elogind-243.7/src/basic/time-util.c:1327:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(t, O_RDONLY|O_CLOEXEC); data/elogind-243.7/src/basic/tmpfile-util.c:120:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stpcpy(stpcpy(stpcpy(mempcpy(t, p, fn - p), ".#"), extra), fn), "XXXXXX"); data/elogind-243.7/src/basic/tmpfile-util.c:230:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(directory, flags|O_TMPFILE|O_EXCL, S_IRUSR|S_IWUSR); data/elogind-243.7/src/basic/tmpfile-util.c:273:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(tmp, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|flags, 0640); data/elogind-243.7/src/basic/tmpfile-util.c:300:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proc_fd_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(fd) + 1]; data/elogind-243.7/src/basic/unit-def.c:40:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const table[_UNIT_TYPE_MAX] = { data/elogind-243.7/src/basic/unit-name.c:692:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dash, ".slice"); data/elogind-243.7/src/basic/user-util.c:619:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0600); data/elogind-243.7/src/basic/util.c:131:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char contents[6]; data/elogind-243.7/src/basic/virt.c:62:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[13]; data/elogind-243.7/src/basic/virt.c:275:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/cpuinfo", "re"); data/elogind-243.7/src/basic/virt.c:571:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(name, "re"); data/elogind-243.7/src/basic/virt.c:649:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const virtualization_table[_VIRTUALIZATION_MAX] = { data/elogind-243.7/src/basic/xattr-util.c:98:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/busctl/busctl.c:328:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[SD_ID128_STRING_MAX]; data/elogind-243.7/src/busctl/busctl.c:1176:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char e[2]; data/elogind-243.7/src/busctl/busctl.c:1555:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k + 1]; data/elogind-243.7/src/busctl/busctl.c:1556:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, signature, k); data/elogind-243.7/src/busctl/busctl.c:1600:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k-1]; data/elogind-243.7/src/busctl/busctl.c:1601:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, signature + 1, k - 2); data/elogind-243.7/src/core/cgroup.c:218:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char u[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/core/cgroup.c:219:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char v[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/core/cgroup.c:318:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_BYTES_MAX]; data/elogind-243.7/src/core/cgroup.c:339:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_BYTES_MAX]; data/elogind-243.7/src/core/cgroup.c:435:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ids[SD_ID128_STRING_MAX]; data/elogind-243.7/src/core/cgroup.c:535:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2+DECIMAL_STR_MAX(dev_t)*2+2+4]; data/elogind-243.7/src/core/cgroup.c:556:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2+DECIMAL_STR_MAX(unsigned)+3+4]; data/elogind-243.7/src/core/cgroup.c:607:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/devices", "re"); data/elogind-243.7/src/core/cgroup.c:739:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char v[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/core/cgroup.c:750:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 2]; data/elogind-243.7/src/core/cgroup.c:757:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[(DECIMAL_STR_MAX(usec_t) + 1) * 2 + 1]; data/elogind-243.7/src/core/cgroup.c:769:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 2]; data/elogind-243.7/src/core/cgroup.c:776:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(usec_t) + 2]; data/elogind-243.7/src/core/cgroup.c:848:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:861:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:874:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(dev_t)*2+2+7+DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:891:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char limit_bufs[_CGROUP_IO_LIMIT_TYPE_MAX][DECIMAL_STR_MAX(uint64_t)]; data/elogind-243.7/src/core/cgroup.c:892:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(dev_t)*2+2+(6+DECIMAL_STR_MAX(uint64_t)+1)*4]; data/elogind-243.7/src/core/cgroup.c:914:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:922:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), rbps); data/elogind-243.7/src/core/cgroup.c:925:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), wbps); data/elogind-243.7/src/core/cgroup.c:943:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 1] = "max\n"; data/elogind-243.7/src/core/cgroup.c:1044:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8+DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:1126:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t)+1]; data/elogind-243.7/src/core/cgroup.c:1213:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 1]; data/elogind-243.7/src/core/cgroup.c:1279:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char acc[4], *val; data/elogind-243.7/src/core/cgroup.c:1349:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 2]; data/elogind-243.7/src/core/cgroup.c:1351:33: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%" PRIu64 "\n", c->tasks_max); data/elogind-243.7/src/core/cgroup.c:2973:38: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m->pin_cgroupfs_fd = open(path, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY|O_NONBLOCK); data/elogind-243.7/src/core/cgroup.c:3344:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const field_names[_CGROUP_IO_ACCOUNTING_METRIC_MAX] = { data/elogind-243.7/src/core/cgroup.c:3376:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "re"); data/elogind-243.7/src/core/cgroup.c:3422:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, acc, sizeof(acc)); data/elogind-243.7/src/core/mount-setup.c:540:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timespan[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/journal/journal-send.c:40:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*_f, "CODE_FUNC=", 10); \ data/elogind-243.7/src/journal/journal-send.c:41:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*_f + 10, _func, _fl); \ data/elogind-243.7/src/journal/journal-send.c:90:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8 + LINE_MAX], p[STRLEN("PRIORITY=") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/journal/journal-send.c:93:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8 + LINE_MAX]; // We keep the +8 to not make a too big mess below. data/elogind-243.7/src/journal/journal-send.c:103:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, "MESSAGE=", 8); data/elogind-243.7/src/journal/journal-send.c:265:32: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (c == (char *) iov[i].iov_base + 17 && data/elogind-243.7/src/journal/journal-send.c:398:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[n]; data/elogind-243.7/src/journal/journal-send.c:404:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/journal/journal-send.c:409:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, "MESSAGE=", 8); data/elogind-243.7/src/journal/journal-send.c:412:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer + 8, message, k - 2); data/elogind-243.7/src/journal/journal-send.c:413:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer + 8 + k - 2, ": ", 2); data/elogind-243.7/src/journal/journal-send.c:481:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(header, identifier, l); data/elogind-243.7/src/journal/journal-send.c:518:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8 + LINE_MAX], p[STRLEN("PRIORITY=") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/journal/journal-send.c:530:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, "MESSAGE=", 8); data/elogind-243.7/src/journal/journal-send.c:553:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8 + LINE_MAX]; data/elogind-243.7/src/journal/journal-send.c:619:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(niov, iov, sizeof(struct iovec) * n); data/elogind-243.7/src/journal/sd-journal.c:945:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bid[33], sid[33]; data/elogind-243.7/src/journal/sd-journal.c:1266:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[5 + DECIMAL_STR_MAX(uid_t) + 1]; data/elogind-243.7/src/journal/sd-journal.c:1329:30: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/journal/sd-journal.c:3173:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(j->fields_buffer, o->field.payload, sz); data/elogind-243.7/src/libelogind/sd-bus/bus-creds.c:822:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(p, "re"); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:26:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:28:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p, n); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:68:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n-1]; data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:70:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p + 1, n - 2); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:146:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n]; data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:148:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p + 1, n - 1); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:157:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n-1]; data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:159:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p + 1, n - 2); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:220:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n-1]; data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:222:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p + 1, n - 2); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:264:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x, p, sz); data/elogind-243.7/src/libelogind/sd-bus/bus-gvariant.c:298:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &x, sz); data/elogind-243.7/src/libelogind/sd-bus/bus-match.c:876:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/elogind-243.7/src/libelogind/sd-bus/bus-match.c:1038:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:173:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(np, m->header, sizeof(struct bus_header)); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:240:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p+8, s, l); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:260:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + 8, s, l + 1); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:306:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + 5, s, l + 1); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:509:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(m->creds.label, label, label_sz + 1); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1517:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, p, sz); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1588:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*) a + 4, p, sz - 4); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1595:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*) a + 1, p, sz - 1); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1600:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, p, sz); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1702:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, iov[i].iov_base, iov[i].iov_len); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1860:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*) a + 1, contents, l + 1); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2116:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a+1, c->signature, l); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2143:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2145:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p, n); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2214:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2216:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p, n); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2421:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k + 1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2422:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, t + 1, k); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2477:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k - 1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2479:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, t + 1, k - 2); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2617:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, iov[i].iov_base, iov[i].iov_len); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2868:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*) d + 2, signature, l); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3214:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[j+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3215:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, c->signature + c->index + n, j); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3834:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3836:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p, n); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3878:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[n+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3880:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, p, n); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4481:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k + 1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4482:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, t + 1, k); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4549:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k - 1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4550:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, t + 1, k - 2); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4661:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k+1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4662:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, types+1, k); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4729:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[k-1]; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4730:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, types+1, k-2); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:5064:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sig[l + 1], *s = sig; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:5113:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sig[l + 1], *s = sig; data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:357:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + b->auth_iovec[0].iov_len, t, l); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:369:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[3 + 32 + 2 + 1]; data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:1038:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(CMSG_DATA(control), m->fds, sizeof(int) * m->n_fds); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:512:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * const table[_BUS_STATE_MAX] = { data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:751:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b->sockaddr.un.sun_path, path, l); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:765:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b->sockaddr.un.sun_path+1, abstract, l); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:833:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&b->sockaddr, result->ai_addr, result->ai_addrlen); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:2667:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sid[33]; data/elogind-243.7/src/libelogind/sd-bus/test-bus-match.c:129:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/elogind-243.7/src/libelogind/sd-bus/test-bus-signature.c:9:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[256]; data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:420:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fpath[PATH_MAX]; data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:515:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(CMSG_DATA(cmsg), fds, sizeof(int) * n_fds); data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:489:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char syspath[strlen(path) + 1 + strlen(dent->d_name) + 1]; data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:49:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[8]; data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:361:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char raw[8192]; data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:367:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cred_msg[CMSG_SPACE(sizeof(struct ucred))]; data/elogind-243.7/src/libelogind/sd-device/device-private.c:331:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char devlink[l + 1]; data/elogind-243.7/src/libelogind/sd-device/device-private.c:345:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tag[l + 1]; data/elogind-243.7/src/libelogind/sd-device/sd-device.c:238:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[DECIMAL_STR_MAX(unsigned) * 2 + 1]; data/elogind-243.7/src/libelogind/sd-device/sd-device.c:276:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subsys[PATH_MAX]; data/elogind-243.7/src/libelogind/sd-device/sd-device.c:651:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subsys[PATH_MAX]; data/elogind-243.7/src/libelogind/sd-device/sd-device.c:1146:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[DECIMAL_STR_MAX(usec_t)]; data/elogind-243.7/src/libelogind/sd-event/sd-event.c:1617:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_PATH|O_CLOEXEC| data/elogind-243.7/src/libelogind/sd-event/sd-event.c:3254:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[ELEMENTSOF(e->delays) * DECIMAL_STR_MAX(unsigned) + 1], *p; data/elogind-243.7/src/libelogind/sd-event/test-event.c:466:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(unsigned)+1]; data/elogind-243.7/src/libelogind/sd-hwdb/sd-hwdb.c:43:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bytes[LINE_MAX]; data/elogind-243.7/src/libelogind/sd-hwdb/sd-hwdb.c:63:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->bytes + buf->len, s, len); data/elogind-243.7/src/libelogind/sd-hwdb/sd-hwdb.c:328:27: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). hwdb->f = fopen(hwdb_bin_path, "re"); data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:14:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *id128_to_uuid_string(sd_id128_t id, char s[37]) { data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:14:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *id128_to_uuid_string(sd_id128_t id, char s[37]) { data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:81:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[36 + 2]; data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:134:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDONLY|O_CLOEXEC|O_NOCTTY); data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:142:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[36 + 2]; data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:179:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY|O_TRUNC, 0444); data/elogind-243.7/src/libelogind/sd-id128/id128-util.h:11:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *id128_to_uuid_string(sd_id128_t id, char s[37]); data/elogind-243.7/src/libelogind/sd-id128/id128-util.h:11:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *id128_to_uuid_string(sd_id128_t id, char s[37]); data/elogind-243.7/src/libelogind/sd-id128/sd-id128.c:21:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _public_ char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]) { data/elogind-243.7/src/libelogind/sd-id128/sd-id128.c:21:50: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _public_ char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]) { data/elogind-243.7/src/libelogind/sd-login/sd-login.c:957:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[l+1]; data/elogind-243.7/src/login/eloginctl.c:295:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *table[_ACTION_MAX] = { data/elogind-243.7/src/login/eloginctl.c:380:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/login/elogind.c:85:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[DECIMAL_STR_MAX(pid_t) + 2]; data/elogind-243.7/src/login/elogind.c:215:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX+1]; data/elogind-243.7/src/login/loginctl.c:506:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char since1[FORMAT_TIMESTAMP_RELATIVE_MAX]; data/elogind-243.7/src/login/loginctl.c:507:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char since2[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/login/loginctl.c:640:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char since1[FORMAT_TIMESTAMP_RELATIVE_MAX]; data/elogind-243.7/src/login/loginctl.c:641:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char since2[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/login/logind-action.c:28:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * const target_table[_HANDLE_ACTION_MAX] = { data/elogind-243.7/src/login/logind-action.c:53:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * const message_table[_HANDLE_ACTION_MAX] = { data/elogind-243.7/src/login/logind-brightness.c:146:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char brs[DECIMAL_STR_MAX(uint32_t)+1]; data/elogind-243.7/src/login/logind-button.c:318:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/elogind-243.7/src/login/logind-button.c:327:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); data/elogind-243.7/src/login/logind-core.c:629:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[sizeof("autovt@tty.service") + DECIMAL_STR_MAX(unsigned)]; data/elogind-243.7/src/login/logind-dbus.c:3038:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 1]; data/elogind-243.7/src/login/logind-dbus.c:3050:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(uint64_t) + 1]; data/elogind-243.7/src/login/logind-inhibit.c:346:30: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). i->fifo_fd = open(i->fifo_path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/login/logind-inhibit.c:367:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open(i->fifo_path, O_WRONLY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/login/logind-inhibit.c:502:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static thread_local char buffer[97]; data/elogind-243.7/src/login/logind-seat.c:176:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char p[sizeof("/dev/tty") + DECIMAL_STR_MAX(unsigned)]; data/elogind-243.7/src/login/logind-seat.c:373:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[64]; data/elogind-243.7/src/login/logind-session-device.c:132:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(sd->node, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); data/elogind-243.7/src/login/logind-session.c:1146:30: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). s->fifo_fd = open(s->fifo_path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/login/logind-session.c:1167:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r = open(s->fifo_path, O_WRONLY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/login/logind-session.c:1311:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[sizeof("/dev/tty") + DECIMAL_STR_MAX(s->vtnr)]; data/elogind-243.7/src/login/logind-session.c:1319:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(path, "/dev/tty%u", s->vtnr); data/elogind-243.7/src/login/logind-user.c:49:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lu[DECIMAL_STR_MAX(uid_t) + 1]; data/elogind-243.7/src/login/logind-user.c:858:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/login/logind-utmp.c:63:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date[FORMAT_TIMESTAMP_MAX] = {}; data/elogind-243.7/src/login/logind.c:640:28: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m->reserve_vt_fd = open(p, O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK); data/elogind-243.7/src/login/logind.c:841:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m->console_active_fd = open("/sys/class/tty/tty0/active", O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/login/pam_elogind.c:149:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(c, display+1, k); data/elogind-243.7/src/login/pam_elogind.c:459:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rt[STRLEN("/run/user/") + DECIMAL_STR_MAX(uid_t)]; data/elogind-243.7/src/login/pam_elogind.c:710:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[DECIMAL_STR_MAX(vtnr)]; data/elogind-243.7/src/login/pam_elogind.c:711:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u", vtnr); data/elogind-243.7/src/login/user-runtime-dir.c:64:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char options[sizeof("mode=0700,uid=,gid=,size=,smackfsroot=*") data/elogind-243.7/src/login/user-runtime-dir.c:131:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; data/elogind-243.7/src/login/user-runtime-dir.c:160:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; data/elogind-243.7/src/shared/bootspec.c:90:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "re"); data/elogind-243.7/src/shared/bootspec.c:182:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "re"); data/elogind-243.7/src/shared/bus-util.c:391:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timestamp[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/shared/bus-util.c:399:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timespan[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/shared/bus-util.c:740:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*p).bytes, v, n); data/elogind-243.7/src/shared/bus-util.c:1183:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char external_buf[DECIMAL_STR_MAX(uint64_t)], *p; data/elogind-243.7/src/shared/clean-ipc.c:45:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/sysvipc/shm", "re"); data/elogind-243.7/src/shared/clean-ipc.c:109:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/sysvipc/sem", "re"); data/elogind-243.7/src/shared/clean-ipc.c:168:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/sysvipc/msg", "re"); data/elogind-243.7/src/shared/clean-ipc.c:331:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[1+strlen(de->d_name)+1]; data/elogind-243.7/src/shared/conf-parser.c:297:28: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = ours = fopen(filename, "re"); data/elogind-243.7/src/shared/efivars.c:59:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char signature[16]; data/elogind-243.7/src/shared/efivars.c:238:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDONLY|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/shared/efivars.c:348:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0644); data/elogind-243.7/src/shared/efivars.c:361:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf->buf, value, size); data/elogind-243.7/src/shared/efivars.c:425:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&u1, &uuid->u1, sizeof(uint32_t)); data/elogind-243.7/src/shared/efivars.c:430:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&u2, &uuid->u2, sizeof(uint16_t)); data/elogind-243.7/src/shared/efivars.c:433:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&u3, &uuid->u3, sizeof(uint16_t)); data/elogind-243.7/src/shared/efivars.c:436:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&id128->bytes[8], uuid->u4, sizeof(uuid->u4)); data/elogind-243.7/src/shared/efivars.c:446:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char boot_id[9]; data/elogind-243.7/src/shared/efivars.c:557:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(guid, &uuid, sizeof(uuid)); data/elogind-243.7/src/shared/efivars.c:583:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char boot_id[9]; data/elogind-243.7/src/shared/efivars.c:611:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&devicep->drive.part_nr, &part, sizeof(uint32_t)); data/elogind-243.7/src/shared/efivars.c:612:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&devicep->drive.part_start, &pstart, sizeof(uint64_t)); data/elogind-243.7/src/shared/efivars.c:613:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&devicep->drive.part_size, &psize, sizeof(uint64_t)); data/elogind-243.7/src/shared/efivars.c:640:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char boot_id[9]; data/elogind-243.7/src/shared/efivars.c:680:30: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static int boot_id_hex(const char s[static 4]) { data/elogind-243.7/src/shared/efivars.c:922:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, v, sizeof(uint64_t)); data/elogind-243.7/src/shared/exec-util.c:49:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *_argv[2]; data/elogind-243.7/src/shared/exec-util.c:76:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char **directories, data/elogind-243.7/src/shared/format-table.c:80:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[0]; data/elogind-243.7/src/shared/format-table.c:1269:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(p, "%i", d->int_val); data/elogind-243.7/src/shared/format-table.c:1329:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(p, "%u", d->uint_val); data/elogind-243.7/src/shared/format-table.c:1389:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(p, "%i%%" , d->percent); data/elogind-243.7/src/shared/format-table.c:1396:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IF_NAMESIZE + 1]; data/elogind-243.7/src/shared/format-table.c:1506:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret + lspace, clickable ?: str, clickable_length); data/elogind-243.7/src/shared/json.c:98:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[0]; data/elogind-243.7/src/shared/json.c:399:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(v->string, s, n); data/elogind-243.7/src/shared/json.c:601:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(w->string, l[v->n_elements], k+1); data/elogind-243.7/src/shared/json.c:1954:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s + n, c, len); data/elogind-243.7/src/shared/json.c:3155:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINE_MAX]; data/elogind-243.7/src/shared/musl_missing.h:55:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (char *) memcpy(x_out, x_in, x_len-1); \ data/elogind-243.7/src/shared/output-mode.c:24:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const output_mode_table[_OUTPUT_MODE_MAX] = { data/elogind-243.7/src/shared/pager.c:263:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *args[4] = { "man", NULL, NULL, NULL }; data/elogind-243.7/src/shared/pretty-print.c:143:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(filename, "re"); data/elogind-243.7/src/shared/qsort_r_missing.c:150:57: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. tmp = ( char* ) memcpy ( tmp, b1, s ); data/elogind-243.7/src/shared/qsort_r_missing.c:154:57: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. tmp = ( char* ) memcpy ( tmp, b2, s ); data/elogind-243.7/src/shared/qsort_r_missing.c:163:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( tmp, b1, n1 * s ); data/elogind-243.7/src/shared/qsort_r_missing.c:164:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( b, p->t, ( n - n2 ) * s ); data/elogind-243.7/src/shared/qsort_r_missing.c:259:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( tmp_storage, ip, s ); data/elogind-243.7/src/shared/qsort_r_missing.c:264:41: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( jp, kp, s ); data/elogind-243.7/src/shared/qsort_r_missing.c:271:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( jp, tmp_storage, s ); data/elogind-243.7/src/shared/serialize.c:56:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LONG_LINE_MAX]; data/elogind-243.7/src/shared/sleep-config.c:202:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/proc/swaps", "re"); data/elogind-243.7/src/shared/sleep-config.c:371:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result_fiemap->fm_extents + result_extents, data/elogind-243.7/src/shared/sleep-config.c:389:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result_fiemap, fiemap, sizeof(struct fiemap)); data/elogind-243.7/src/shared/spawn-polkit-agent.c:23:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char notify_fd[DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/shared/utmp-wtmp.c:196:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src + l - buf_size, buf_size); data/elogind-243.7/src/shared/utmp-wtmp.c:316:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(tty, O_WRONLY|O_NONBLOCK|O_NOCTTY|O_CLOEXEC); data/elogind-243.7/src/shared/utmp-wtmp.c:371:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/sleep/sleep.c:50:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_num_str [DECIMAL_STR_MAX(uint32_t) * 2 + 2]; data/elogind-243.7/src/sleep/sleep.c:52:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char offset_str[DECIMAL_STR_MAX(uint64_t)]; data/elogind-243.7/src/sleep/sleep.c:53:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_str[DECIMAL_STR_MAX(uint64_t)]; data/elogind-243.7/src/sleep/sleep.c:98:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(device, O_RDONLY | O_CLOEXEC | O_NONBLOCK); data/elogind-243.7/src/sleep/sleep.c:174:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *f = fopen("/sys/power/state", "we"); data/elogind-243.7/src/sleep/sleep.c:251:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen("/sys/power/state", "we"); data/elogind-243.7/src/sleep/sleep.c:336:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/systemd/sd-id128.h:38:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]); data/elogind-243.7/src/systemd/sd-id128.h:38:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]); data/elogind-243.7/src/test/test-alloc-util.c:145:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p2, p1, 1024); data/elogind-243.7/src/test/test-copy.c:57:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64] = {}; data/elogind-243.7/src/test/test-copy.c:154:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024], buf2[1024]; data/elogind-243.7/src/test/test-copy.c:156:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infd = open("/usr/lib/os-release", O_RDONLY|O_CLOEXEC); data/elogind-243.7/src/test/test-copy.c:158:24: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infd = open("/etc/os-release", O_RDONLY|O_CLOEXEC); data/elogind-243.7/src/test/test-copy.c:195:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(src, O_RDONLY | O_CLOEXEC | O_NOCTTY); data/elogind-243.7/src/test/test-ellipsize.c:16:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/elogind-243.7/src/test/test-exec-util.c:198:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128] = {}; data/elogind-243.7/src/test/test-exec-util.c:220:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128] = {}; data/elogind-243.7/src/test/test-fd-util.c:61:24: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert_se((b = open("/dev/null", O_RDONLY|O_CLOEXEC)) >= 0); data/elogind-243.7/src/test/test-fd-util.c:100:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char wbuffer[196*1024 - 7]; data/elogind-243.7/src/test/test-fd-util.c:101:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rbuffer[sizeof(wbuffer)]; data/elogind-243.7/src/test/test-fd-util.c:154:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). new_fd = open("/dev/null", O_RDONLY); data/elogind-243.7/src/test/test-fd-util.c:174:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[10]; data/elogind-243.7/src/test/test-fd-util.c:205:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert_se(open("/dev/full", O_WRONLY|O_CLOEXEC) == 0); data/elogind-243.7/src/test/test-fd-util.c:260:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd1 = open("/etc/fstab", O_RDONLY|O_CLOEXEC); data/elogind-243.7/src/test/test-format-util.c:9:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_BYTES_MAX]; data/elogind-243.7/src/test/test-fs-util.c:531:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_RDONLY|O_DIRECTORY|O_CLOEXEC); data/elogind-243.7/src/test/test-fs-util.c:660:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(p, O_WRONLY|O_CLOEXEC|O_CREAT|O_EXCL, 0600); data/elogind-243.7/src/test/test-hashmap-plain.c:756:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/test/test-hashmap-plain.c:794:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[FORMAT_TIMESPAN_MAX]; data/elogind-243.7/src/test/test-hashmap-plain.c:814:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[DECIMAL_STR_MAX(unsigned)]; data/elogind-243.7/src/test/test-id128.c:25:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char t[33], q[37]; data/elogind-243.7/src/test/test-io-util.c:13:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char check[n]; data/elogind-243.7/src/test/test-mountpoint-util.c:52:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert_se(f = fopen("/proc/self/mountinfo", "re")); data/elogind-243.7/src/test/test-mountpoint-util.c:155:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file1, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664); data/elogind-243.7/src/test/test-mountpoint-util.c:158:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file2, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664); data/elogind-243.7/src/test/test-mountpoint-util.c:195:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(dir1file, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664); data/elogind-243.7/src/test/test-mountpoint-util.c:236:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(dir2file, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664); data/elogind-243.7/src/test/test-path-util.c:80:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY); data/elogind-243.7/src/test/test-path-util.c:201:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[PATH_MAX]; data/elogind-243.7/src/test/test-path-util.c:529:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char foo[FILENAME_MAX+2]; data/elogind-243.7/src/test/test-process-util.c:39:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[STRLEN("/proc//comm") + DECIMAL_STR_MAX(pid_t)]; data/elogind-243.7/src/test/test-procfs-util.c:11:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[CONST_MAX(FORMAT_TIMESPAN_MAX, FORMAT_BYTES_MAX)]; data/elogind-243.7/src/test/test-signal-util.c:54:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[STRLEN("RTMIN+") + DECIMAL_STR_MAX(int) + 1]; data/elogind-243.7/src/test/test-siphash24.c:97:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(in_buf, in, sizeof(in)); data/elogind-243.7/src/test/test-siphash24.c:99:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(in_buf + 1, in, sizeof(in)); data/elogind-243.7/src/test/test-siphash24.c:101:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(in_buf + 2, in, sizeof(in)); data/elogind-243.7/src/test/test-siphash24.c:103:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(in_buf + 4, in, sizeof(in)); data/elogind-243.7/src/test/test-stat-util.c:78:25: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert_se((fd = open("/proc/self/ns/mnt", O_CLOEXEC|O_RDONLY)) >= 0); data/elogind-243.7/src/test/test-stat-util.c:82:25: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert_se((fd = open("/proc/self/ns/net", O_CLOEXEC|O_RDONLY)) >= 0); data/elogind-243.7/src/test/test-string-util.c:117:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[40]; data/elogind-243.7/src/test/test-strxcpyx.c:11:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target[25]; data/elogind-243.7/src/test/test-strxcpyx.c:29:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target[25]; data/elogind-243.7/src/test/test-strxcpyx.c:49:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target[25]; data/elogind-243.7/src/test/test-strxcpyx.c:63:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target[25]; data/elogind-243.7/src/test/test-strxcpyx.c:74:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target[25]; data/elogind-243.7/src/test/test-strxcpyx.c:85:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[100 * DECIMAL_STR_MAX(unsigned) + 1]; data/elogind-243.7/src/test/test-strxcpyx.c:86:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[100 * DECIMAL_STR_MAX(unsigned) + 1], *p; data/elogind-243.7/src/test/test-unit-file.c:50:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_TIMESTAMP_MAX]; data/elogind-243.7/src/test/test-util.c:315:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FORMAT_BYTES_MAX]; data/elogind-243.7/src/basic/bus-label.c:23:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, strlen(s)*3 + 1); data/elogind-243.7/src/basic/cap-list.c:47:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sc = lookup_capability(name, strlen(name)); data/elogind-243.7/src/basic/cap-list.c:74:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). add = strlen(p); data/elogind-243.7/src/basic/cap-list.c:79:25: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(mempcpy(str + n, p, add), " "); data/elogind-243.7/src/basic/cgroup-util.c:573:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char prefix[strlen(pto) + 1]; data/elogind-243.7/src/basic/cgroup-util.c:898:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char prefix[strlen(path) + 1]; data/elogind-243.7/src/basic/cgroup-util.c:1068:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cs = strlen(controller_str); data/elogind-243.7/src/basic/cgroup-util.c:2025:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (l != strlen(n)) data/elogind-243.7/src/basic/cgroup-util.c:2474:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(k); data/elogind-243.7/src/basic/cgroup-util.c:2824:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char s[1 + strlen(n) + 1]; data/elogind-243.7/src/basic/copy.c:304:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fdf, buf, sizeof buf); data/elogind-243.7/src/basic/copy.c:954:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(p); data/elogind-243.7/src/basic/env-util.c:55:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return env_name_is_valid_n(e, strlen(e)); data/elogind-243.7/src/basic/env-util.c:75:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(e) > sc_arg_max() - 3) data/elogind-243.7/src/basic/env-util.c:98:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(e) > sc_arg_max() - 1) data/elogind-243.7/src/basic/env-util.c:248:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(pattern); data/elogind-243.7/src/basic/env-util.c:470:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strv_env_get_n(l, name, strlen(name), 0); data/elogind-243.7/src/basic/env-util.h:33:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return replace_env_n(format, strlen(format), env, flags); data/elogind-243.7/src/basic/errno-list.c:31:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sc = lookup_errno(name, strlen(name)); data/elogind-243.7/src/basic/escape.c:102:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cescape_length(s, strlen(s)); data/elogind-243.7/src/basic/escape.c:368:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cunescape_length(s, strlen(s), flags, ret); data/elogind-243.7/src/basic/escape.c:384:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ans = new(char, MIN(strlen(s), console_width) * 4 + 1); data/elogind-243.7/src/basic/escape.c:388:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset(ans, '_', MIN(strlen(s), console_width) * 4); data/elogind-243.7/src/basic/escape.c:389:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ans[MIN(strlen(s), console_width) * 4] = 0; data/elogind-243.7/src/basic/escape.c:496:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, strlen(s)*2+1); data/elogind-243.7/src/basic/escape.c:525:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, (style == ESCAPE_POSIX) + 1 + strlen(s)*2 + 1 + 1); data/elogind-243.7/src/basic/fileio.c:288:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(blob); data/elogind-243.7/src/basic/fileio.c:528:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t += strlen(pattern); data/elogind-243.7/src/basic/fileio.c:909:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = fgetc(f); data/elogind-243.7/src/basic/fs-util.c:56:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(path); data/elogind-243.7/src/basic/fs-util.c:287:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). u = umask(0777); data/elogind-243.7/src/basic/fs-util.c:289:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(u); data/elogind-243.7/src/basic/fs-util.c:934:71: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (empty_or_root(root) || (size_t)(todo - buffer) > strlen(root)) && data/elogind-243.7/src/basic/hash-funcs.c:9:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). siphash24_compress(p, strlen(p) + 1, state); data/elogind-243.7/src/basic/hexdecoct.c:123:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(p); data/elogind-243.7/src/basic/hexdecoct.c:313:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(p); data/elogind-243.7/src/basic/hexdecoct.c:715:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(p); data/elogind-243.7/src/basic/hostname-util.c:230:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (sethostname(s, strlen(s)) < 0) data/elogind-243.7/src/basic/io-util.c:41:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). l = read(fd, buf, sizeof(buf)); data/elogind-243.7/src/basic/io-util.c:74:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = read(fd, p, nbytes); data/elogind-243.7/src/basic/io-util.c:320:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = iovw_put(iovw, x, strlen(x)); data/elogind-243.7/src/basic/io-util.h:72:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define IOVEC_INIT_STRING(string) IOVEC_INIT((char*) string, strlen(string)) data/elogind-243.7/src/basic/khash.c:130:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(algorithm) >= sizeof(sa.alg.salg_name)) data/elogind-243.7/src/basic/locale-util.c:246:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) >= 128) data/elogind-243.7/src/basic/log.c:751:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(object); data/elogind-243.7/src/basic/mkdir.c:125:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char t[strlen(path) + 1]; data/elogind-243.7/src/basic/parse-util.c:266:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = e + strlen(table[i].suffix); data/elogind-243.7/src/basic/path-util.c:196:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, n_parents * 3 + strlen(t) + 1); data/elogind-243.7/src/basic/path-util.c:439:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lvalue, strlen(path), fatal ? "" : ", ignoring"); data/elogind-243.7/src/basic/path-util.c:571:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz += 1 + strlen(p); data/elogind-243.7/src/basic/path-util.c:834:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = k = strlen(path); data/elogind-243.7/src/basic/path-util.c:905:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) >= PATH_MAX) /* PATH_MAX is counted *with* the trailing NUL byte */ data/elogind-243.7/src/basic/path-util.c:949:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(filename); data/elogind-243.7/src/basic/path-util.h:148:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _l = strlen(_root) + 1 + strlen(_path) + 1; \ data/elogind-243.7/src/basic/path-util.h:148:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _l = strlen(_root) + 1 + strlen(_path) + 1; \ data/elogind-243.7/src/basic/process-util.c:216:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(name); data/elogind-243.7/src/basic/process-util.c:229:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(program_invocation_name); data/elogind-243.7/src/basic/process-util.c:230:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(program_invocation_name, name, k); data/elogind-243.7/src/basic/process-util.c:263:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nn, name, nn_size); data/elogind-243.7/src/basic/process-util.c:301:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(mm, name, mm_size); data/elogind-243.7/src/basic/process-util.c:318:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(saved_argv[0]); data/elogind-243.7/src/basic/process-util.c:319:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(saved_argv[0], name, k); data/elogind-243.7/src/basic/process-util.c:328:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memzero(saved_argv[i], strlen(saved_argv[i])); data/elogind-243.7/src/basic/process-util.c:477:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l += strlen(field); data/elogind-243.7/src/basic/process-util.c:845:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(field); data/elogind-243.7/src/basic/siphash24.h:31:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return siphash24(s, strlen(s) + 1, k); data/elogind-243.7/src/basic/smack-util.c:81:72: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = lsetxattr(path, smack_attr_to_string(attr), label, strlen(label), 0); data/elogind-243.7/src/basic/smack-util.c:100:70: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = fsetxattr(fd, smack_attr_to_string(attr), label, strlen(label), 0); data/elogind-243.7/src/basic/smack-util.c:160:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (setxattr(procfs_path, "security.SMACK64", label, strlen(label), 0) < 0) { data/elogind-243.7/src/basic/socket-util.c:102:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/basic/socket-util.c:116:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s+1); data/elogind-243.7/src/basic/socket-util.c:182:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(n) > IF_NAMESIZE-1) data/elogind-243.7/src/basic/socket-util.c:927:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) >= IFNAMSIZ) data/elogind-243.7/src/basic/socket-util.c:958:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) >= IFNAMSIZ) data/elogind-243.7/src/basic/socket-util.c:1357:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(path); data/elogind-243.7/src/basic/string-util.c:43:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sl = strlen(s); data/elogind-243.7/src/basic/string-util.c:44:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(postfix); data/elogind-243.7/src/basic/string-util.c:64:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sl = strlen(s); data/elogind-243.7/src/basic/string-util.c:65:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(postfix); data/elogind-243.7/src/basic/string-util.c:90:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sl = strlen(s); data/elogind-243.7/src/basic/string-util.c:91:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). wl = strlen(word); data/elogind-243.7/src/basic/string-util.c:194:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). a = strlen(s); data/elogind-243.7/src/basic/string-util.c:217:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(x); data/elogind-243.7/src/basic/string-util.c:227:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(t); data/elogind-243.7/src/basic/string-util.c:696:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). old_len = strlen(old_string); data/elogind-243.7/src/basic/string-util.c:697:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new_len = strlen(new_string); data/elogind-243.7/src/basic/string-util.c:699:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(text); data/elogind-243.7/src/basic/string-util.c:774:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). isz = _isz ? *_isz : strlen(*ibuf); data/elogind-243.7/src/basic/string-util.c:891:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(t); data/elogind-243.7/src/basic/string-util.c:946:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/basic/string-util.c:977:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b = strdup(x + strlen(sep)); data/elogind-243.7/src/basic/string-util.c:1025:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*p && s && strneq(*p, s, l) && (l > strlen(*p) || (*p)[l] == '\0')) data/elogind-243.7/src/basic/string-util.h:75:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(prefix); data/elogind-243.7/src/basic/string-util.h:85:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(prefix); data/elogind-243.7/src/basic/string-util.h:125:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _len_ += strlen(_appendees_[_i_]); \ data/elogind-243.7/src/basic/string-util.h:173:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return ellipsize_mem(s, strlen(s), length, percent); data/elogind-243.7/src/basic/string-util.h:211:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(s); data/elogind-243.7/src/basic/string-util.h:216:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, src, buf_len); data/elogind-243.7/src/basic/string-util.h:226:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(token); data/elogind-243.7/src/basic/string-util.h:247:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(token); data/elogind-243.7/src/basic/string-util.h:268:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *t = realloc(*p, strlen(*p) + 1); data/elogind-243.7/src/basic/strv.c:359:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(separator); data/elogind-243.7/src/basic/strv.c:366:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n += m + strlen(*s); data/elogind-243.7/src/basic/strv.c:697:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). z = strlen(*i); data/elogind-243.7/src/basic/strxcpyx.c:44:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strnpcpy(dest, size, src, strlen(src)); data/elogind-243.7/src/basic/strxcpyx.c:99:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strnscpy(dest, size, src, strlen(src)); data/elogind-243.7/src/basic/terminal-util.c:138:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(line) != 1) data/elogind-243.7/src/basic/terminal-util.c:340:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50 * USEC_PER_MSEC); data/elogind-243.7/src/basic/terminal-util.c:454:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). l = read(notify, &buffer, sizeof(buffer)); data/elogind-243.7/src/basic/time-util.c:308:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(buf); data/elogind-243.7/src/basic/time-util.c:316:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(buf); data/elogind-243.7/src/basic/time-util.c:329:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tn = strlen(tm.tm_zone); data/elogind-243.7/src/basic/time-util.c:452:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(p, "infinity", l-1); data/elogind-243.7/src/basic/time-util.c:458:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy(p, "0", l-1); data/elogind-243.7/src/basic/time-util.c:702:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). skip = strlen(day_nr[i].name); data/elogind-243.7/src/basic/tmpfile-util.c:61:45: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). _unused_ _cleanup_umask_ mode_t u = umask(0077); data/elogind-243.7/src/basic/tmpfile-util.c:116:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 2 + strlen(extra) + 6 + 1); data/elogind-243.7/src/basic/tmpfile-util.c:116:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 2 + strlen(extra) + 6 + 1); data/elogind-243.7/src/basic/tmpfile-util.c:154:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 2 + strlen(extra) + 16 + 1); data/elogind-243.7/src/basic/tmpfile-util.c:154:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 2 + strlen(extra) + 16 + 1); data/elogind-243.7/src/basic/tmpfile-util.c:194:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 3 + strlen(extra) + 16 + 1); data/elogind-243.7/src/basic/tmpfile-util.c:194:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new(char, strlen(p) + 3 + strlen(extra) + 16 + 1); data/elogind-243.7/src/basic/umask-util.h:11:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(*u & 0777); data/elogind-243.7/src/basic/umask-util.h:24:53: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). for (_cleanup_umask_ mode_t _saved_umask_ = umask(mask) | S_IFMT; \ data/elogind-243.7/src/basic/unit-name.c:45:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(n) >= UNIT_NAME_MAX) data/elogind-243.7/src/basic/unit-name.c:228:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b = strlen(suffix); data/elogind-243.7/src/basic/unit-name.c:325:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, strlen(f)*4+1); data/elogind-243.7/src/basic/unit-name.c:465:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b = strlen(i); data/elogind-243.7/src/basic/unit-name.c:467:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = new(char, a + 1 + b + strlen(e) + 1); data/elogind-243.7/src/basic/unit-name.c:493:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = new(char, a + 1 + strlen(e) + 1); data/elogind-243.7/src/basic/unit-name.c:644:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = new(char, strlen(name) * 4 + strlen(suffix) + 1); data/elogind-243.7/src/basic/unit-name.c:644:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = new(char, strlen(name) * 4 + strlen(suffix) + 1); data/elogind-243.7/src/basic/unit-name.c:726:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). subslice = new(char, (e - slice) + 1 + strlen(name) + 6 + 1); data/elogind-243.7/src/basic/utf8.c:178:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = s = malloc(strlen(str) * 4 + 1); data/elogind-243.7/src/basic/utf8.c:222:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = s = prev_s = malloc(strlen(str) * 4 + 1); data/elogind-243.7/src/basic/utf8.c:265:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = mempcpy(s, UTF8_REPLACEMENT_CHARACTER, strlen(UTF8_REPLACEMENT_CHARACTER)); data/elogind-243.7/src/basic/utf8.c:278:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = mempcpy(s, "…", strlen("…")); data/elogind-243.7/src/basic/util.c:150:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, contents, sizeof(contents)); data/elogind-243.7/src/basic/util.c:166:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, contents, sizeof(contents)); data/elogind-243.7/src/busctl/busctl.c:1094:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_width = MAX(name_width, strlen(m->interface)); data/elogind-243.7/src/busctl/busctl.c:1096:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_width = MAX(name_width, strlen(m->name) + 1); data/elogind-243.7/src/busctl/busctl.c:1098:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). type_width = MAX(type_width, strlen(m->type)); data/elogind-243.7/src/busctl/busctl.c:1100:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). signature_width = MAX(signature_width, strlen(m->signature)); data/elogind-243.7/src/busctl/busctl.c:1102:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result_width = MAX(result_width, strlen(m->result)); data/elogind-243.7/src/busctl/busctl.c:1104:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result_width = MAX(result_width, strlen(m->value)); data/elogind-243.7/src/cgroups-agent/cgroups-agent.c:38:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(argv[1]); data/elogind-243.7/src/core/cgroup.c:1223:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf, "-1\n", sizeof(buf)); data/elogind-243.7/src/core/cgroup.c:2763:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). l = read(fd, &buffer, sizeof(buffer)); data/elogind-243.7/src/journal/journal-send.c:38:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _fl = strlen(_func) + 1; \ data/elogind-243.7/src/journal/journal-send.c:394:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = isempty(message) ? 0 : strlen(message) + 2; data/elogind-243.7/src/journal/journal-send.c:407:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(buffer + 8 + k, j, strlen(j)+1); data/elogind-243.7/src/journal/journal-send.c:478:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(identifier); data/elogind-243.7/src/journal/sd-journal.c:256:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(data); data/elogind-243.7/src/journal/sd-journal.c:1113:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(item) < 2 || item[1] != '=') data/elogind-243.7/src/journal/sd-journal.c:2301:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). field_length = strlen(field); data/elogind-243.7/src/journal/sd-journal.c:2684:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). l = read(j->inotify_fd, &buffer, sizeof(buffer)); data/elogind-243.7/src/journal/sd-journal.c:2921:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(j->unique_field); data/elogind-243.7/src/journal/sd-journal.c:3219:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d = strlen(field) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-container.c:75:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(pair[0], &error_buf, sizeof(error_buf)); data/elogind-243.7/src/libelogind/sd-bus/bus-creds.c:743:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen(p); data/elogind-243.7/src/libelogind/sd-bus/bus-error.c:384:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (errno == ERANGE || strlen(x) >= k - 1) { data/elogind-243.7/src/libelogind/sd-bus/bus-internal.c:294:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = new(char, strlen(v)*3+1); data/elogind-243.7/src/libelogind/sd-bus/bus-introspect.c:105:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *names += strlen(*names) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:226:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:286:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:453:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). label_sz = strlen(label); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1478:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen(p) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1539:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = 4 + strlen(p) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1547:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = 1 + strlen(p) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1743:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nindex = c->index + 1 + strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1854:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1891:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:1966:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2109:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(c->signature); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2326:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n_struct = strlen(types); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2462:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n_struct = strlen(s); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:2859:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(signature); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3697:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c->index += 1 + strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3735:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:3984:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4025:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(contents); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4413:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n_struct = strlen(types); /* length of current struct contents signature */ data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:4534:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n_struct = strlen(s); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:5068:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sig, *signature + 1, l); data/elogind-243.7/src/libelogind/sd-bus/bus-message.c:5114:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sig, *signature + 1, l); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:1185:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:1410:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(m->path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:1552:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:1693:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *names += strlen(*names) + 1; data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:2275:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:2467:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:2644:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-objects.c:2814:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pl = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:259:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(line); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:351:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(t); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:413:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line + strlen("AUTH ANONYMOUS"), data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:414:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l - strlen("AUTH ANONYMOUS")); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:421:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (l <= strlen("AUTH ANONYMOUS")) data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:430:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line + strlen("AUTH EXTERNAL"), data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:431:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l - strlen("AUTH EXTERNAL")); data/elogind-243.7/src/libelogind/sd-bus/bus-socket.c:438:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (l <= strlen("AUTH EXTERNAL")) data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:636:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(key); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:743:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(path); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:757:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(abstract); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:1403:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = new0(char, strlen(host)); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:1406:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(t, host, a - host + 1); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:1407:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(t, a + 2, rbracket - a - 2); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:3813:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_length = strlen(path_template); data/elogind-243.7/src/libelogind/sd-bus/sd-bus.c:3839:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_length += strlen(label) - 1; data/elogind-243.7/src/libelogind/sd-bus/test-bus-match.c:135:70: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(bus_match_node_type_from_string(x, strlen(x)) == i); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:384:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(path); data/elogind-243.7/src/libelogind/sd-daemon/sd-daemon.c:428:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(stpcpy(fpath, "/dev/mqueue"), path, sizeof(fpath) - 12); data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:489:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char syspath[strlen(path) + 1 + strlen(dent->d_name) + 1]; data/elogind-243.7/src/libelogind/sd-device/device-enumerator.c:489:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char syspath[strlen(path) + 1 + strlen(dent->d_name) + 1]; data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:438:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bufpos = strlen(buf.raw) + 1; data/elogind-243.7/src/libelogind/sd-device/device-monitor.c:469:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return MurmurHash2(str, strlen(str), 0); data/elogind-243.7/src/libelogind/sd-device/device-private.c:333:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(devlink, word, l); data/elogind-243.7/src/libelogind/sd-device/device-private.c:347:32: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(tag, word, l); data/elogind-243.7/src/libelogind/sd-device/device-private.c:520:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(prop) + 1 + strlen(val); data/elogind-243.7/src/libelogind/sd-device/device-private.c:520:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(prop) + 1 + strlen(val); data/elogind-243.7/src/libelogind/sd-device/sd-device.c:1497:90: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!GREEDY_REALLOC(devlinks, devlinks_allocated, devlinks_len + strlen(devlink) + 2)) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:1525:78: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!GREEDY_REALLOC(tags, tags_allocated, tags_len + strlen(tag) + 2)) data/elogind-243.7/src/libelogind/sd-device/sd-device.c:1838:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(_value); data/elogind-243.7/src/libelogind/sd-event/sd-event.c:2457:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ss = read(fd, &x, sizeof(x)); data/elogind-243.7/src/libelogind/sd-event/sd-event.c:2598:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(d->fd, &si, sizeof(si)); data/elogind-243.7/src/libelogind/sd-event/sd-event.c:2647:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(d->fd, &d->buffer, sizeof(d->buffer)); data/elogind-243.7/src/libelogind/sd-hwdb/sd-hwdb.c:207:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(prefix + p); data/elogind-243.7/src/libelogind/sd-id128/id128-util.c:42:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/login/elogind.c:147:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); data/elogind-243.7/src/login/elogind.c:159:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); data/elogind-243.7/src/login/elogind.c:334:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (argc == 2) && argv[1] && strlen(argv[1]) ) { data/elogind-243.7/src/login/logind-button.c:144:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). l = read(b->fd, &ev, sizeof(ev)); data/elogind-243.7/src/login/logind-seat.c:385:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = read(s->manager->console_active_fd, t, sizeof(t)-1); data/elogind-243.7/src/login/logind-seat.c:681:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) > 255) data/elogind-243.7/src/login/logind.c:1267:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); data/elogind-243.7/src/login/user-runtime-dir.c:212:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); data/elogind-243.7/src/shared/bootspec.c:304:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). f = fmemopen_unlocked((void*) osrelease, strlen(osrelease), "r"); data/elogind-243.7/src/shared/clean-ipc.c:331:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char fn[1+strlen(de->d_name)+1]; data/elogind-243.7/src/shared/conf-parser.c:95:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = lookup(key, strlen(key)); data/elogind-243.7/src/shared/conf-parser.c:97:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = lookup(lvalue, strlen(lvalue)); data/elogind-243.7/src/shared/conf-parser.c:216:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(l); data/elogind-243.7/src/shared/conf-parser.c:347:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(continuation) + strlen(l) > LONG_LINE_MAX) { data/elogind-243.7/src/shared/conf-parser.c:347:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(continuation) + strlen(l) > LONG_LINE_MAX) { data/elogind-243.7/src/shared/dev-setup.c:86:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). u = umask(0000); data/elogind-243.7/src/shared/efivars.c:250:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, &a, sizeof(a)); data/elogind-243.7/src/shared/efivars.c:262:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buf, (size_t) st.st_size - 4); data/elogind-243.7/src/shared/efivars.c:388:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). u16 = utf8_to_utf16(v, strlen(v)); data/elogind-243.7/src/shared/efivars.c:588:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). title_len = (strlen(title)+1) * 2; data/elogind-243.7/src/shared/efivars.c:589:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len = (strlen(path)+1) * 2; data/elogind-243.7/src/shared/efivars.c:722:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(de->d_name) != 45) data/elogind-243.7/src/shared/efivars.c:932:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) > FILENAME_MAX) /* Make sure entry names fit in filenames */ data/elogind-243.7/src/shared/format-table.c:239:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(data) + 1; data/elogind-243.7/src/shared/format-table.c:1175:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->formatted = new(char, strlen(d->string) + 1); data/elogind-243.7/src/shared/format-table.c:1255:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(p); data/elogind-243.7/src/shared/format-table.c:1467:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). old_length = strlen(str); data/elogind-243.7/src/shared/format-table.c:1474:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). clickable_length = strlen(clickable); data/elogind-243.7/src/shared/json.c:119:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = malloc(offsetof(JsonSource, name) + strlen(name) + 1); data/elogind-243.7/src/shared/json.c:387:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(s); data/elogind-243.7/src/shared/json.c:590:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(l[v->n_elements]); data/elogind-243.7/src/shared/json.c:729:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:740:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:744:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:751:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:757:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:759:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:765:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:772:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:778:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:813:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:820:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:826:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:861:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:874:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:911:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:918:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:924:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:947:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:1046:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1048:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1054:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:1066:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1068:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1076:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:1091:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1093:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. goto mismatch; data/elogind-243.7/src/shared/json.c:1120:1: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch: data/elogind-243.7/src/shared/json.c:1273:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = 1 + (v->source ? strlen(v->source->name) : 0) + data/elogind-243.7/src/shared/pager.c:169:73: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = loop_write(exe_name_pipe[1], pager_args[0], strlen(pager_args[0]) + 1, false); data/elogind-243.7/src/shared/pager.c:187:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = loop_write(exe_name_pipe[1], exe, strlen(exe) + 1, false); data/elogind-243.7/src/shared/pager.c:197:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = loop_write(exe_name_pipe[1], "(built-in)", strlen("(built-in)") + 1, false); data/elogind-243.7/src/shared/pager.c:269:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(desc); data/elogind-243.7/src/shared/serialize.c:26:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(key) + 1 + strlen(value) + 1 > LONG_LINE_MAX) { data/elogind-243.7/src/shared/serialize.c:26:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(key) + 1 + strlen(value) + 1 > LONG_LINE_MAX) { data/elogind-243.7/src/shared/serialize.c:68:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (k < 0 || (size_t) k >= sizeof(buf) || strlen(key) + 1 + k + 1 > LONG_LINE_MAX) { data/elogind-243.7/src/shared/sleep-config.c:122:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(*type); data/elogind-243.7/src/shared/sleep-config.c:158:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(*type); data/elogind-243.7/src/shared/test-tables.h:32:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf("%*s ...\n", (int) strlen(name), ""); data/elogind-243.7/src/shared/udev-util.c:48:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(log_val); data/elogind-243.7/src/shared/utmp-wtmp.c:104:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(store->ut_host, uts.release, sizeof(store->ut_host)); data/elogind-243.7/src/shared/utmp-wtmp.c:106:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy(store->ut_line, "~", sizeof(store->ut_line)); /* or ~~ ? */ data/elogind-243.7/src/shared/utmp-wtmp.c:107:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(store->ut_id, "~~", sizeof(store->ut_id)); data/elogind-243.7/src/shared/utmp-wtmp.c:172:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(store.ut_user, "shutdown", sizeof(store.ut_user)); data/elogind-243.7/src/shared/utmp-wtmp.c:183:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(store.ut_user, "reboot", sizeof(store.ut_user)); data/elogind-243.7/src/shared/utmp-wtmp.c:192:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(src); data/elogind-243.7/src/shared/utmp-wtmp.c:194:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, src, buf_size); data/elogind-243.7/src/shared/utmp-wtmp.c:230:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(store.ut_user, user, sizeof(store.ut_user)-1); data/elogind-243.7/src/shared/utmp-wtmp.c:299:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(store.ut_user, "runlevel", sizeof(store.ut_user)); data/elogind-243.7/src/shared/utmp-wtmp.c:321:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). left = strlen(message); data/elogind-243.7/src/test/test-conf-parser.c:328:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(fwrite(s, strlen(s), 1, f) == 1); data/elogind-243.7/src/test/test-copy.c:71:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(out_fd, buf, sizeof buf) == (ssize_t) strlen(text)); data/elogind-243.7/src/test/test-copy.c:71:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(read(out_fd, buf, sizeof buf) == (ssize_t) strlen(text)); data/elogind-243.7/src/test/test-copy.c:166:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(pipefd[0], buf, sizeof(buf)); data/elogind-243.7/src/test/test-copy.c:170:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r2 = read(infd, buf2, sizeof(buf2)); data/elogind-243.7/src/test/test-ellipsize.c:76:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (l = strlen(s); l >= 0; l--) data/elogind-243.7/src/test/test-ellipsize.c:77:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (k = strlen(s) + 1; k >= 0; k--) data/elogind-243.7/src/test/test-env-file.c:53:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_1, strlen(env_file_1)) == strlen(env_file_1)); data/elogind-243.7/src/test/test-env-file.c:53:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_1, strlen(env_file_1)) == strlen(env_file_1)); data/elogind-243.7/src/test/test-env-file.c:75:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_2, strlen(env_file_2)) == strlen(env_file_2)); data/elogind-243.7/src/test/test-env-file.c:75:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_2, strlen(env_file_2)) == strlen(env_file_2)); data/elogind-243.7/src/test/test-env-file.c:92:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_3, strlen(env_file_3)) == strlen(env_file_3)); data/elogind-243.7/src/test/test-env-file.c:92:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_3, strlen(env_file_3)) == strlen(env_file_3)); data/elogind-243.7/src/test/test-env-file.c:107:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_4, strlen(env_file_4)) == strlen(env_file_4)); data/elogind-243.7/src/test/test-env-file.c:107:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_4, strlen(env_file_4)) == strlen(env_file_4)); data/elogind-243.7/src/test/test-env-file.c:126:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_5, strlen(env_file_5)) == strlen(env_file_5)); data/elogind-243.7/src/test/test-env-file.c:126:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, env_file_5, strlen(env_file_5)) == strlen(env_file_5)); data/elogind-243.7/src/test/test-escape.c:39:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(t) == i || strlen(t) == i - 1 || strlen(t) == i - 2 || strlen(t) == i - 3); data/elogind-243.7/src/test/test-escape.c:39:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(t) == i || strlen(t) == i - 1 || strlen(t) == i - 2 || strlen(t) == i - 3); data/elogind-243.7/src/test/test-escape.c:39:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(t) == i || strlen(t) == i - 1 || strlen(t) == i - 2 || strlen(t) == i - 3); data/elogind-243.7/src/test/test-escape.c:39:97: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(t) == i || strlen(t) == i - 1 || strlen(t) == i - 2 || strlen(t) == i - 3); data/elogind-243.7/src/test/test-escape.c:44:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(t) == i); data/elogind-243.7/src/test/test-exec-util.c:201:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, buf, sizeof buf) >= 0); data/elogind-243.7/src/test/test-exec-util.c:213:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, *t, strlen(*t)) == (ssize_t) strlen(*t)); data/elogind-243.7/src/test/test-exec-util.c:213:66: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(write(fd, *t, strlen(*t)) == (ssize_t) strlen(*t)); data/elogind-243.7/src/test/test-exec-util.c:222:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, buf, sizeof buf - 1) > 0); data/elogind-243.7/src/test/test-fd-util.c:108:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, rbuffer, sizeof(rbuffer)) == 3); data/elogind-243.7/src/test/test-fd-util.c:117:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, rbuffer, sizeof(rbuffer)) == 0); data/elogind-243.7/src/test/test-fd-util.c:128:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, rbuffer, sizeof(rbuffer)) == sizeof(rbuffer)); data/elogind-243.7/src/test/test-fd-util.c:212:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(3, buffer, sizeof(buffer)) == 1); data/elogind-243.7/src/test/test-fd-util.c:214:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(0, buffer, sizeof(buffer)) == 6); data/elogind-243.7/src/test/test-fd-util.c:220:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(3, buffer, sizeof(buffer)) == 1); data/elogind-243.7/src/test/test-fd-util.c:238:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x = read(fd1, a, sizeof(a)); data/elogind-243.7/src/test/test-fd-util.c:241:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). y = read(fd2, b, sizeof(b)); data/elogind-243.7/src/test/test-fd-util.c:312:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd2, &j, sizeof(j)) == sizeof(j)); data/elogind-243.7/src/test/test-fd-util.c:316:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd2, &j, sizeof(j)) == 0); data/elogind-243.7/src/test/test-fs-util.c:762:45: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). _unused_ _cleanup_umask_ mode_t u = umask(0000); data/elogind-243.7/src/test/test-hashmap-plain.c:927:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). seen[strlen(val) - 1]++; data/elogind-243.7/src/test/test-hexdecoct.c:87:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(s); data/elogind-243.7/src/test/test-hexdecoct.c:104:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). test_unhexmem_one(hex_invalid, strlen(hex_invalid), -EINVAL); data/elogind-243.7/src/test/test-hexdecoct.c:106:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). test_unhexmem_one(hex, strlen(hex) - 1, -EPIPE); data/elogind-243.7/src/test/test-hexdecoct.c:107:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). test_unhexmem_one(hex, strlen(hex), 0); data/elogind-243.7/src/test/test-hexdecoct.c:109:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). test_unhexmem_one(hex_space, strlen(hex_space), 0); data/elogind-243.7/src/test/test-hexdecoct.c:288:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(size == strlen(output)); data/elogind-243.7/src/test/test-io-util.c:23:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert_se(read(fd, check, n) == (ssize_t) n); data/elogind-243.7/src/test/test-json.c:97:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se((size_t) r == strlen(s)); data/elogind-243.7/src/test/test-json.c:114:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se((size_t) r == strlen(s)); data/elogind-243.7/src/test/test-json.c:130:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se((size_t) r == strlen(s)); data/elogind-243.7/src/test/test-json.c:137:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se((size_t) r == strlen(s)); data/elogind-243.7/src/test/test-json.c:371:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(f = fmemopen_unlocked((void*) data, strlen(data), "r")); data/elogind-243.7/src/test/test-process-util.c:87:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). log_info("PID"PID_FMT" strlen(environ): %zi", pid, env ? (ssize_t)strlen(env) : (ssize_t)-errno); data/elogind-243.7/src/test/test-process-util.c:568:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100 * USEC_PER_MSEC); data/elogind-243.7/src/test/test-set.c:19:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). seen[strlen(val) - 1]++; data/elogind-243.7/src/test/test-string-util.c:303:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(strshorten(s, 6)) == 6); data/elogind-243.7/src/test/test-string-util.c:304:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(strshorten(s, 12)) == 6); data/elogind-243.7/src/test/test-string-util.c:305:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(strshorten(s, 2)) == 2); data/elogind-243.7/src/test/test-string-util.c:306:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(strshorten(s, 0)) == 0); data/elogind-243.7/src/test/test-umask-util.c:12:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). u = umask(0111); data/elogind-243.7/src/test/test-umask-util.c:16:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(000) == 0123); data/elogind-243.7/src/test/test-umask-util.c:21:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(u) == 0111); data/elogind-243.7/src/test/test-umask-util.c:24:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(000) == 0135); data/elogind-243.7/src/test/test-umask-util.c:29:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(0111) == u); data/elogind-243.7/src/test/test-umask-util.c:32:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(000) == 0315); data/elogind-243.7/src/test/test-umask-util.c:38:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). assert_se(umask(u) == 0111); data/elogind-243.7/src/test/test-utf8.c:165:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert_se(strlen(a) == sizeof(utf8)); data/elogind-243.7/src/test/test-utf8.c:206:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). a = utf8_to_utf16(p, strlen(p)); data/elogind-243.7/src/uaccess-command/uaccess-command.c:46:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); data/elogind-243.7/src/uaccess-command/uaccess-command.c:52:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!seat || !strlen(seat)) data/elogind-243.7/src/update-utmp/update-utmp.c:260:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0022); ANALYSIS SUMMARY: Hits = 1079 Lines analyzed = 152128 in approximately 4.08 seconds (37264 lines/second) Physical Source Lines of Code (SLOC) = 109593 Hits@level = [0] 369 [1] 377 [2] 473 [3] 54 [4] 146 [5] 29 Hits@level+ = [0+] 1448 [1+] 1079 [2+] 702 [3+] 229 [4+] 175 [5+] 29 Hits/KSLOC@level+ = [0+] 13.2125 [1+] 9.84552 [2+] 6.40552 [3+] 2.08955 [4+] 1.59682 [5+] 0.264615 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.