On 2018-11-23 07:27, Tobias Schramm wrote: > blobmsg_check_attr_safe adds a length limit specifying the max offset from > attr that > can be read safely > > Signed-off-by: Tobias Schramm <toblemi...@gmail.com> > --- > blobmsg.c | 27 ++++++++++++++++++++++----- > blobmsg.h | 18 ++++++++++++++++++ > 2 files changed, 40 insertions(+), 5 deletions(-) > > diff --git a/blobmsg.c b/blobmsg.c > index 8019c45..dd4b506 100644 > --- a/blobmsg.c > +++ b/blobmsg.c > @@ -32,18 +32,33 @@ blobmsg_namelen(const struct blobmsg_hdr *hdr) > } > > bool blobmsg_check_attr(const struct blob_attr *attr, bool name) > +{ > + return blobmsg_check_attr_safe(attr, name, blob_raw_len(attr)); > +} Please make blobmsg_check_attr an inline function in blobmsg.h
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel