From 0ed4e9e907b3a3f1c2ae209b1dab384b1fa7a490 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sun, 3 Nov 2024 09:02:45 +0300 Subject: [PATCH] intel_name_lookup_shim.c (get_intel_device_name): Fix SEGFAULT btop would always fail with "Segmentation fault" when used on machines where the GPU does not have a codename (e.g. on embedded Intel graphics on Intel(R) Atom(TM) CPU D2500.) The reason for this behavior is that when a GPU does not have codename (it is NULL) the call to "strcpy" segfaults as the procedure effectively tries to access a NULL pointer. See . * src/linux/intel_gpu_top/intel_name_lookup_shim.c (get_intel_device_name): Add a check if "info->codename" is null; if it is, set the device name to "(unknown)" to prevent the SEGFAULT error. --- src/linux/intel_gpu_top/intel_name_lookup_shim.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/linux/intel_gpu_top/intel_name_lookup_shim.c b/src/linux/intel_gpu_top/intel_name_lookup_shim.c index e714f80..38f87fa 100644 --- a/src/linux/intel_gpu_top/intel_name_lookup_shim.c +++ b/src/linux/intel_gpu_top/intel_name_lookup_shim.c @@ -84,10 +84,14 @@ char *get_intel_device_name(const char *device_id) { char full_name[256]; const struct intel_device_info *info = intel_get_device_info(devid); if (info) { - strcpy(dev_name, info->codename); - dev_name[0] = toupper(dev_name[0]); + if (info->codename == NULL) { + strcpy(dev_name, "(unknown)"); + } else { + strcpy(dev_name, info->codename); + dev_name[0] = toupper(dev_name[0]); + } snprintf(full_name, sizeof(full_name), "Intel %s (Gen%u)", dev_name, info->graphics_ver); return strdup(full_name); } return NULL; -} \ No newline at end of file +} base-commit: 2e7208d59c54515080027a5ecbb89d2054047985 -- 2.46.0 rm>
AgeCommit message (Expand)Author
2023-05-23services: cups: Add cups PAM service....Fixes <https://issues.guix.gnu.org/63198>. Have the CUPS service extend pam-root-service-type providing minimal configuration to authenticate users. Since PAM authentication is provided, the regular cups package can be used as default instead of the minimal, PAM-lacking variant. * gnu/services/cups.scm (cups-configuration) [cups]: Replace cups-minimal with cups. [allow-empty-password?]: PAM service configuration permitting empty passwords. (opaque-cups-configuration): Likewise. (cups-pam-service): New procedure. (cups-service-type): Extend pam-root-service-type with cups-pam-service. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> muradm
2023-05-03services: cups: Use cups-minimal to avoid PAM authentication....Fixes <https://issues.guix.gnu.org/63198>. Our CUPS service doesn't currently extend the PAM configuration, and prevents users from authenticating. Use cups-minimal, which has no PAM support. * gnu/services/cups.scm (cups-configuration) [cups]: Use cups-minimal. (opaque-cups-configuration): Likewise. Maxim Cournoyer
2022-05-29gnu: cups-minimal, cups: Update to 2.4.2....* gnu/packages/cups.scm (cups-minimal, cups): Update to 2.4.2. [arguments]: Remove --disable-* #:configure-flags as they do nothing. Add (different) --without-* ones that do. Run a newly passing test; skip a newly failing test. [home-page]: Link to specific subdirectory. [description]: Better describe the state & direction of the project. * gnu/services/cups.scm (comma-separated-string-list-or-#f?) (serialize-comma-separated-string-list-or-#f): New procedures. (cups-configuration): Update <default-auth-type> and <browse-dns-sd-sub-types> defaults. Remove obsolete <classification>, <listen-back-log>, <page-log-format> and <rip-cache> fields. Add new <max-subscriptions>, <max-subscriptions-per-job>, <max-subscriptions-per-printer>, <max-subscriptions-per-user>, and <ready-paper-sizes> ones. * doc/guix.texi (Desktop Services): Likewise for their documentation. Tobias Geerinckx-Rice
2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus
2021-11-30services: Accept <inferior-package>s in lieu of <package>s....* gnu/services/authentication.scm (fprintd-configuration) (nslcd-configuration): Substitute file-like objects for package ones. * gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration): Likewise. * gnu/services/cups.scm (package-list?, cups-configuration): Likewise. * gnu/services/dns.scm (verify-knot-configuration) (ddclient-configuration): Likewise. * gnu/services/docker.scm (docker-configuration): Likewise. * gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise. * gnu/services/getmail.scm (getmail-configuration): Likewise. * gnu/services/mail.scm (dovecot-configuration) (opaque-dovecot-configuration): Likewise. * gnu/services/messaging.scm (prosody-configuration) (opaque-prosody-configuration): Likewise. * gnu/services/monitoring.scm (zabbix-server-configuration) (zabbix-agent-configuration): Likewise. * gnu/services/networking.scm (opendht-configuration): Likewise. * gnu/services/pm.scm (tlp-configuration): Likewise. * gnu/services/telephony.scm (jami-configuration): Likewise. * gnu/services/virtualization.scm (libvirt-configuration) (qemu-guest-agent-configuration): Likewise. * gnu/services/vpn.scm (openvpn-client-configuration): Likewise. Tobias Geerinckx-Rice