Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612400 - dev-libs/libdnet exports strlcat() strlcpy()
Summary: dev-libs/libdnet exports strlcat() strlcpy()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-12 08:33 UTC by Jeroen Roovers (RETIRED)
Modified: 2022-05-16 19:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fragroute-1.2.6-includes.patch (fragroute-1.2.6-includes.patch,1.43 KB, patch)
2017-03-12 08:33 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2017-03-12 08:33:55 UTC
Created attachment 466784 [details, diff]
fragroute-1.2.6-includes.patch

Well, I had some fun this morning. I was investigating two warnings in net-analyzer/fragroute-1.2.6:

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * mod.c:140:4: warning: implicit declaration of function ‘strlcat’ [-Wimplicit-function-declaration]
 * tun-loop.c:288:2: warning: implicit declaration of function ‘strlcpy’ [-Wimplicit-function-declaration]

So I came up with the attached patch that has fragroute use libbsd's strlcat() and strlcpy(), but then found myself puzzling at why --as-needed strips libbsd. It's because the dev-libs/libdnet library (same author as fragroute) helpfully exports both functions!

    84: 0000000000008d60   176 FUNC    GLOBAL DEFAULT   10 strlcat
   151: 0000000000008e20    80 FUNC    GLOBAL DEFAULT   10 strlcpy

I am not aware of any linking problems or security issues with these duplicated functions, but I assume someone else might be.
Comment 1 Larry the Git Cow gentoo-dev 2022-05-16 19:56:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de397177f198704042dbfe0499ad1b8813e553f8

commit de397177f198704042dbfe0499ad1b8813e553f8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-16 06:03:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-16 19:56:37 +0000

    dev-libs/libdnet: add 1.16.1
    
    Closes: https://bugs.gentoo.org/612400
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libdnet/Manifest              |  1 +
 dev-libs/libdnet/libdnet-1.16.1.ebuild | 79 ++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)