diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-12-10 13:53:23 +0300 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-12-25 12:31:58 +0300 |
commit | 4dfd24ed88c4d721d2b26d478b9ada86395d0554 (patch) | |
tree | 3a0267150972177356fdddf837a4348e60ddb5b8 /blobmsg.c | |
parent | 2df6d35e3299ecce7975502a007c1ca456f4b8bb (diff) |
blobmsg: make blobmsg_len and blobmsg_data_len return unsigned value
One usually doesn't guard against negative length values in the code.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'blobmsg.c')
-rw-r--r-- | blobmsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -35,7 +35,8 @@ bool blobmsg_check_attr(const struct blob_attr *attr, bool name) { const struct blobmsg_hdr *hdr; const char *data; - int id, len; + size_t len; + int id; if (blob_len(attr) < sizeof(struct blobmsg_hdr)) return false; |