diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2016-06-30 09:46:08 +0200 |
---|---|---|
committer | Filip Tehlar <ftehlar@cisco.com> | 2016-06-30 10:01:02 +0200 |
commit | c4770ecc622e815bd6f355aea0bedfe38820c757 (patch) | |
tree | 30cf261f5fc4568cb0bed4dcf94634806ec60f5a /vpp-api-test/vat | |
parent | ec175104cf5b09a91f2f9c7a36c6ca0703979eeb (diff) |
Fix wrong interger type when unformating value in VAT
Since format string "%d" expects a 32 bit value using u8 type in unformat()
results in buffer overflow.
Change-Id: Idee5b588049d7573ddbde56c28030f9db3758493
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'vpp-api-test/vat')
-rw-r--r-- | vpp-api-test/vat/api_format.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c index ad9986984ec..504c3b40854 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -10013,9 +10013,9 @@ api_lisp_add_del_locator(vat_main_t * vam) u32 sw_if_index = ~0; u8 sw_if_index_set = 0; u8 sw_if_index_if_name_set = 0; - u8 priority = ~0; + u32 priority = ~0; u8 priority_set = 0; - u8 weight = ~0; + u32 weight = ~0; u8 weight_set = 0; u8 is_add = 1; u8 *locator_set_name = NULL; @@ -10112,7 +10112,7 @@ api_lisp_add_del_local_eid(vat_main_t * vam) ip4_address_t eidv4; ip6_address_t eidv6; u8 mac[6] = {0}; - u8 tmp_eid_lenght = ~0; + u32 tmp_eid_lenght = ~0; u8 eid_lenght = ~0; u8 *locator_set_name = NULL; u8 locator_set_name_set = 0; @@ -10221,7 +10221,7 @@ api_lisp_gpe_add_del_fwd_entry(vat_main_t * vam) u8 eidv6_set = 0, slocv6_set = 0, dlocv6_set = 0; ip4_address_t eidv4, slocv4, dlocv4; ip6_address_t eidv6, slocv6, dlocv6; - u8 tmp_eid_lenght = ~0; + u32 tmp_eid_lenght = ~0; u8 eid_lenght = ~0; /* Parse args required to build the message */ |