diff options
author | Tobias Schramm <tobleminer@gmail.com> | 2018-11-13 06:16:12 +0300 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-12-25 12:31:58 +0300 |
commit | cd3059796a576673d4af696c8b696ab5de729a3c (patch) | |
tree | 7d9b9922c45f9e9cba41827920c46b2b69d12afe /blobmsg.h | |
parent | 143303149c8b87fec76b7f2f4b365baae1e18d2c (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.h | 2 |
1 files changed, 2 insertions, 0 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 * |