mirror of
https://git.yoctoproject.org/poky
synced 2026-03-18 05:09:41 +01:00
The bug was introduced by upstream commit [1] where strncat was replaced with
internal my_strncat function, such as:
char dest[32] = "/sys/devices/platform/axi";
my_strncat(dest, "/", sizeof(dest) - strlen(dest) - 1);
Will result in dest string being:
/sys/
and not the expected:
/sys/devices/platform/axi/
The meaning of the "len" parameter in the my_strncat function is the size limit for
copying characters from "from", not the size limit for "to" after copying. Also,
the "#define safestrcat(to, from) my_strncat(to, from, sizeof(to) - strlen(to) - 1)"
has already imposed a limit on max based on the size of "to". Modify the function
to prevent truncation of content when too many bytes are passed to the my_strcat function.
[1] 0719881cad
(From OE-Core rev: a5d2a5ce94b82957e2a9336c18dce9b28073cd71)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24 lines
875 B
BlitzBasic
24 lines
875 B
BlitzBasic
SUMMARY = "Tools for working with sysfs"
|
|
DESCRIPTION = "Tools for working with the sysfs virtual filesystem. The tool 'systool' can query devices by bus, class and topology."
|
|
HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html"
|
|
|
|
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
|
|
LICENSE:${PN} = "GPL-2.0-only"
|
|
LICENSE:libsysfs = "LGPL-2.1-only"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=dcc19fa9307a50017fca61423a7d9754 \
|
|
file://cmd/GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
file://lib/LGPL;md5=4fbd65380cdd255951079008b364516c"
|
|
|
|
SRC_URI = "git://github.com/linux-ras/sysfsutils.git;protocol=https;branch=master \
|
|
file://0001-Modify-my_strncat-function.patch \
|
|
"
|
|
|
|
SRCREV = "da2f1f8500c0af6663a56ce2bff07f67e60a92e0"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
inherit autotools
|
|
|
|
PACKAGES =+ "libsysfs"
|
|
FILES:libsysfs = "${libdir}/lib*${SOLIBS}"
|