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>
This commit is contained in:
parent
143303149c
commit
cd3059796a
2 changed files with 48 additions and 14 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue