diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-02-27 22:25:59 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-02-27 22:25:59 +0100 |
commit | 82fbd857471292ca71dc06b05f11089962f33a4f (patch) | |
tree | 39b16ddfb91ec1264cd25263418123fad6086acb /package/libs | |
parent | 4c1779ac2cb4face8676c470aa366161db7c6534 (diff) | |
download | upstream-82fbd857471292ca71dc06b05f11089962f33a4f.tar.gz upstream-82fbd857471292ca71dc06b05f11089962f33a4f.tar.bz2 upstream-82fbd857471292ca71dc06b05f11089962f33a4f.zip |
libubox: backport blobmsg_check_array() fix
Fixes: FS#2833
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 955634b473284847e3c8281a6ac85655329d8b06)
Diffstat (limited to 'package/libs')
-rw-r--r-- | package/libs/libubox/Makefile | 2 | ||||
-rw-r--r-- | package/libs/libubox/patches/0017-blobmsg-fix-wrong-payload-len-passed-from-blobmsg_ch.patch | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index f5a1f12f22..e3a827c1ab 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libubox -PKG_RELEASE=3 +PKG_RELEASE=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git diff --git a/package/libs/libubox/patches/0017-blobmsg-fix-wrong-payload-len-passed-from-blobmsg_ch.patch b/package/libs/libubox/patches/0017-blobmsg-fix-wrong-payload-len-passed-from-blobmsg_ch.patch new file mode 100644 index 0000000000..f1a99e5081 --- /dev/null +++ b/package/libs/libubox/patches/0017-blobmsg-fix-wrong-payload-len-passed-from-blobmsg_ch.patch @@ -0,0 +1,33 @@ +From 75e300aeec25e032a9778bea34c713969960d1f0 Mon Sep 17 00:00:00 2001 +From: Chris Nisbet <nischris@gmail.com> +Date: Wed, 12 Feb 2020 21:00:31 +1300 +Subject: [PATCH] blobmsg: fix wrong payload len passed from + blobmsg_check_array + +Fix incorrect use of blobmsg_len() on passed blobmsg to +blobmsg_check_array_len() introduced in commit 379cd33d1992 +("fix wrong payload len passed from blobmsg_check_array") by using correct +blob_len(). + +By using blobmsg_len() a value too small was passed to blobmsg_check_array() +which could lead to this function returning an error when there is none. + +Fixes: 379cd33d1992 ("fix wrong payload len passed from blobmsg_check_array") +Signed-off-by: Chris Nisbet <nischris@gmail.com> +[add fixes tag, rewrap commit message] +Signed-off-by: Jo-Philipp Wich <jo@mein.io> +--- + blobmsg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/blobmsg.c ++++ b/blobmsg.c +@@ -120,7 +120,7 @@ bool blobmsg_check_attr_len(const struct + + int blobmsg_check_array(const struct blob_attr *attr, int type) + { +- return blobmsg_check_array_len(attr, type, blobmsg_len(attr)); ++ return blobmsg_check_array_len(attr, type, blob_len(attr)); + } + + int blobmsg_check_array_len(const struct blob_attr *attr, int type, size_t len) |