[Rpm-maint] [rpm-software-management/rpm] elfdeps: fix incorrect string length in ld64 soname prefix check (PR #4161)
majianhan
notifications at github.com
Mon Mar 23 04:10:48 UTC 2026
## Problem
In `tools/elfdeps.c`, the `skipSoname()` function checks soname prefixes to decide
whether a shared library should be skipped. The comparison for `ld64.` and `ld64-`
prefixes uses an incorrect length of 3 instead of 5:
```c
if (rstreqn(soname, "ld.", 3) || rstreqn(soname, "ld-", 3) ||
rstreqn(soname, "ld64.", 3) || rstreqn(soname, "ld64-", 3))
```
The length `3` only covers the prefix `"ld6"`, not the intended `"ld64."` or `"ld64-"`.
This means:
- Sonames starting with `"ld6"` (e.g. `ld6something.so`) are incorrectly skipped
- Sonames like `ld640.so` or `ld641.so` would be accidentally filtered out
The adjacent checks for `"ld."` and `"ld-"` correctly pass length 3 because those
prefixes are exactly 3 characters long. The fix passes length 5 to match the full
`"ld64."` and `"ld64-"` prefixes.
## Fix
Pass the correct length `5` to `rstreqn()` for the `ld64.` and `ld64-` prefix checks.
Fixes: #3596
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/4161
-- Commit Summary --
* elfdeps: fix incorrect string length in ld64 soname prefix check
-- File Changes --
M tools/elfdeps.c (2)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/4161.patch
https://github.com/rpm-software-management/rpm/pull/4161.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4161
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/4161 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260322/abafd71b/attachment.htm>
More information about the Rpm-maint
mailing list