Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
7f0abd5
)
api: check id is valid for bounce checking
77/28477/2
author
Benoît Ganne
<
[email protected]
>
Tue, 21 Jan 2020 17:33:14 +0000
(18:33 +0100)
committer
Andrew Yourtchenko
<
[email protected]
>
Tue, 18 Aug 2020 19:47:21 +0000
(19:47 +0000)
If the id is invalid we cannot check whether we must free the message or
not, free it anyway.
Type: fix
Change-Id: Ie4426f601390d1e5e14c739f670e8c1e6e3aaf1e
Signed-off-by: Benoît Ganne <
[email protected]
>
(cherry picked from commit
ff13e46215ab96df988310b4a20eddefad92de99
)
src/vlibapi/api_shared.c
patch
|
blob
|
history
diff --git
a/src/vlibapi/api_shared.c
b/src/vlibapi/api_shared.c
index
ce7c4ae
..
6849ab0
100644
(file)
--- a/
src/vlibapi/api_shared.c
+++ b/
src/vlibapi/api_shared.c
@@
-595,7
+595,7
@@
vl_msg_api_handler_with_vm_node (api_main_t * am,
* Special-case, so we can e.g. bounce messages off the vnet
* main thread without copying them...
*/
- if (!(am->message_bounce[id]))
+ if (
id >= vec_len (am->message_bounce) ||
!(am->message_bounce[id]))
vl_msg_api_free (the_msg);
if (PREDICT_FALSE (am->elog_trace_api_messages))