Files
meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_4.13.5.bb
Yi Zhao dca497d728 ][PATCH] ufs-utils: fix crash for ufs-utils list_bsg
The full_path buffer in find_bsg_device function consists of:
path + '/' + files->d_name + '\0'

So the buffer size should be: strlen(path) + strlen(files->d_name) + 2,
not: strlen(path) + strlen(files->d_name) + 1.

Backport a patch to fix crash when running 32-bit binary on 64-bit
system:
$ ufs-utils list_bsg
malloc(): invalid next size (unsorted)
Aborted (core dumped)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-07-27 14:35:10 -04:00

33 lines
829 B
BlitzBasic

SUMMARY = "Tool to access UFS (Universal Flash Storage) devices"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
BRANCH ?= "dev"
SRCREV = "18c0a8454ca1cf8969170049f8c628d88627beec"
SRC_URI = "git://github.com/westerndigitalcorporation/ufs-utils.git;protocol=https;branch=${BRANCH} \
file://0001-ufs_cmds-fix-full_path-buffer-size-in-find_bsg_devic.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" CFLAGS="${CFLAGS}""
CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__ -D_GNU_SOURCE"
do_configure() {
sed -i -e "s|-static$||g" ${S}/Makefile
}
do_install() {
install -D -m 755 ${S}/ufs-utils ${D}${bindir}/ufs-utils
}
PROVIDES += "ufs-tool"
RPROVIDES:${PN} += "ufs-tool"