aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2022-08-11 16:00:04 +0200
committerNeels Janosch Hofmeyr <nhofmeyr@sysmocom.de>2022-08-24 17:04:42 +0200
commit92860a29cd21da7d732aaf6eed420161b1622406 (patch)
tree078117f28144ea72c387f420d62343b83e6197e0 /include
parentcb724a348482848e2cba34c19ac45afad87fbee6 (diff)
gtlv: check memory bounds 2/3: decoding TLV
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gtlv/gtlv_dec_enc.h7
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,