Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
api: clean up error message
[vpp.git]
/
src
/
vlibapi
/
api_shared.c
diff --git
a/src/vlibapi/api_shared.c
b/src/vlibapi/api_shared.c
index
0ea5280
..
d2f1759
100644
(file)
--- a/
src/vlibapi/api_shared.c
+++ b/
src/vlibapi/api_shared.c
@@
-1060,8
+1060,9
@@
vl_api_from_api_to_new_vec (void *mp, vl_api_string_t * astr)
u8 *v = 0;
if (vl_msg_api_max_length (mp) < clib_net_to_host_u32 (astr->length))
u8 *v = 0;
if (vl_msg_api_max_length (mp) < clib_net_to_host_u32 (astr->length))
- return format (0, "insane astr->length %u%c",
- clib_net_to_host_u32 (astr->length), 0);
+ return format (0, "Invalid astr->length %u > max (%u)%c",
+ clib_net_to_host_u32 (astr->length),
+ vl_msg_api_max_length (mp), 0);
vec_add (v, astr->buf, clib_net_to_host_u32 (astr->length));
return v;
}
vec_add (v, astr->buf, clib_net_to_host_u32 (astr->length));
return v;
}