diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2022-08-11 16:00:04 +0200 |
---|---|---|
committer | Neels Janosch Hofmeyr <nhofmeyr@sysmocom.de> | 2022-08-24 17:04:42 +0200 |
commit | 92860a29cd21da7d732aaf6eed420161b1622406 (patch) | |
tree | 078117f28144ea72c387f420d62343b83e6197e0 /include/osmocom/gtlv/gtlv_dec_enc.h | |
parent | cb724a348482848e2cba34c19ac45afad87fbee6 (diff) |
gtlv: check memory bounds 2/3: decoding TLV
See Id8d997c9d5e655ff1842ec69eab6c073875c6330
Related: CID#275417
Related: SYS#5599
Change-Id: I841da89112ccf70fcd0f60eb902445fb1712eb48
Diffstat (limited to 'include/osmocom/gtlv/gtlv_dec_enc.h')
-rw-r--r-- | include/osmocom/gtlv/gtlv_dec_enc.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/osmocom/gtlv/gtlv_dec_enc.h b/include/osmocom/gtlv/gtlv_dec_enc.h index cb62fe3..2126beb 100644 --- a/include/osmocom/gtlv/gtlv_dec_enc.h +++ b/include/osmocom/gtlv/gtlv_dec_enc.h @@ -182,9 +182,10 @@ struct osmo_gtlv_coding { */ typedef void (*osmo_gtlv_err_cb)(void *data, void *decoded_struct, const char *file, int line, const char *fmt, ...); -int osmo_gtlvs_decode(void *decoded_struct, unsigned int obj_ofs, struct osmo_gtlv_load *gtlv, bool tlv_ordered, - const struct osmo_gtlv_coding *ie_coding, - osmo_gtlv_err_cb err_cb, void *err_cb_data, const struct value_string *iei_strs); +int osmo_gtlvs_decode(void *decoded_struct, size_t decoded_struct_size, + unsigned int obj_ofs, struct osmo_gtlv_load *gtlv, bool tlv_ordered, + const struct osmo_gtlv_coding *ie_coding, + osmo_gtlv_err_cb err_cb, void *err_cb_data, const struct value_string *iei_strs); int osmo_gtlvs_encode(struct osmo_gtlv_put *gtlv, const void *decoded_struct, size_t decoded_struct_size, unsigned int obj_ofs, const struct osmo_gtlv_coding *ie_coding, osmo_gtlv_err_cb err_cb, |