lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240804161054.942439-1-dilfridge@gentoo.org>
Date: Sun,  4 Aug 2024 18:10:20 +0200
From: Andreas K. Hüttel <dilfridge@...too.org>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org,
	base-system@...too.org,
	Andreas K. Hüttel <dilfridge@...too.org>
Subject: [PATCH] rdma.c: Add <libgen.h> include for basename on musl

This include file is required on musl for availability of basename.

Note that for glibc adding the include can have the side effect of
switching from the GNU implementation of basename (which does not touch
its argument) to the POSIX implementation (which under certain
circumstances modifies the string passed to it, e.g. removing trailing
slashes).

This is safe however since the C99 and C11 standard says:
> The parameters argc and argv and the strings pointed to by the argv
> array shall be modifiable by the program, and retain their last-stored
> values between program startup and program termination.
(multiple google results, unfortunately no official reference link)

Bug: https://bugs.gentoo.org/926341
Signed-off-by: Andreas K. Hüttel <dilfridge@...too.org>
---
Only build-tested so far, but should be straightforward enough...
---
 rdma/rdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rdma/rdma.c b/rdma/rdma.c
index 131c6b2a..f835bf3f 100644
--- a/rdma/rdma.c
+++ b/rdma/rdma.c
@@ -4,6 +4,7 @@
  * Authors:     Leon Romanovsky <leonro@...lanox.com>
  */
 
+#include <libgen.h>
 #include "rdma.h"
 #include "version.h"
 #include "color.h"
-- 
2.44.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ