Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Schramm <tobleminer@gmail.com>2018-11-13 06:16:12 +0300
committerPetr Štetiar <ynezz@true.cz>2019-12-25 12:31:58 +0300
commitcd3059796a576673d4af696c8b696ab5de729a3c (patch)
tree7d9b9922c45f9e9cba41827920c46b2b69d12afe /blobmsg.h
parent143303149c8b87fec76b7f2f4b365baae1e18d2c (diff)
Replace use of blobmsg_check_attr by blobmsg_check_attr_len
blobmsg_check_attr_len adds a length limit specifying the max offset from attr that can be read safely. Signed-off-by: Tobias Schramm <tobleminer@gmail.com> [rebased and reworked, line wrapped commit message, _safe -> _len] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/blobmsg.h b/blobmsg.h
index 00e0fdc..c440159 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -107,6 +107,8 @@ static inline size_t blobmsg_len(const struct blob_attr *attr)
bool blobmsg_check_attr(const struct blob_attr *attr, bool name);
bool blobmsg_check_attr_list(const struct blob_attr *attr, int type);
+bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len);
+
/*
* blobmsg_check_array: validate array/table and return size
*