diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2020-01-23 14:46:24 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2020-01-23 20:18:03 -0800 |
commit | 4de668c9146412ceafc0d11e605f4e06495f89eb (patch) | |
tree | e5b730766040bc6d69b5b04a93d0c52c2814119b /low-can-binding/binding/low-can-cb.cpp | |
parent | 8cbd8efc118df7acdc0a8c49f11bca996c8866ac (diff) |
low-can: fix aborting on can_data not being an json_type_arrayhalibut_8.0.6halibut/8.0.68.0.6halibut
Bug-AGL: SPEC-3129
Change-Id: I41928c5f4c467edb176ad6234c9b775e70035319
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'low-can-binding/binding/low-can-cb.cpp')
-rw-r--r-- | low-can-binding/binding/low-can-cb.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp index 4eac957f..ac894afc 100644 --- a/low-can-binding/binding/low-can-cb.cpp +++ b/low-can-binding/binding/low-can-cb.cpp @@ -617,7 +617,9 @@ static void write_raw_frame(afb_req_t request, const std::string& bus_name, mess } #endif - if(message->get_length() > 0 && message->get_length() <= message->get_maxdlen()) + if(message->get_length() > 0 && + message->get_length() <= message->get_maxdlen() && + json_object_get_type(can_data) == json_type_array) { std::vector<uint8_t> data; for (int i = 0 ; i < message->get_length() ; i++) |