Commit 5889d6ed authored by Vegard Nossum's avatar Vegard Nossum Committed by Jonathan Corbet

scripts/get_abi: fix source path leak

The code currently leaks the absolute path of the ABI files into the
rendered documentation.

There exists code to prevent this, but it is not effective when an
absolute path is passed, which it is when $srctree is used.

I consider this to be a minimal, stop-gap fix; a better fix would strip
off the actual prefix instead of hacking it off with a regex.

Link: https://mastodon.social/@vegard/111677490643495163
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231231235959.3342928-1-vegard.nossum@oracle.com
parent e49ad853
...@@ -98,7 +98,7 @@ sub parse_abi { ...@@ -98,7 +98,7 @@ sub parse_abi {
$name =~ s,.*/,,; $name =~ s,.*/,,;
my $fn = $file; my $fn = $file;
$fn =~ s,Documentation/ABI/,,; $fn =~ s,.*Documentation/ABI/,,;
my $nametag = "File $fn"; my $nametag = "File $fn";
$data{$nametag}->{what} = "File $name"; $data{$nametag}->{what} = "File $name";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment