summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h
diff options
context:
space:
mode:
authorYatian XU <yatian.xu@nokia-sbell.com>2019-09-04 22:43:34 +0800
committerYatian XU <yatian.xu@nokia-sbell.com>2019-09-05 06:51:02 +0800
commit998c19266ef5f74fffd79e9c0c0a65f77ff19a43 (patch)
tree8e011aa227cc5b7a798c13bac6d193c54dff49b9 /veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h
parentad8ef0f0485a8e7490d84511159c274db123c5a3 (diff)
Fix buffer overflow bug in evel_json_encode_event/evel_json_encode_batch_event.
Issue-ID: VNFSDK-463 Signed-off-by: Yatian XU <yatian.xu@nokia-sbell.com> Change-Id: I6263ace34d9dab5e058490d9d011e1535902e41d
Diffstat (limited to 'veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h')
-rw-r--r--veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h
index 9de3868..8cbbeb6 100644
--- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h
+++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel.h
@@ -3063,7 +3063,11 @@ void evel_free_event(void * event);
* @param mode Event mode or Batch mode
* @param max_size Size of storage available in json_body.
* @param event Pointer to the ::EVENT_HEADER to encode.
- * @returns Number of bytes actually written.
+ * @returns The number of characters that would have been written if max_size
+ had been sufficiently large, not counting the terminating null
+ character. Notice that only when this returned value is less than
+ max_size, the string has been completely written(similar to snprintf).
+ Otherwise, need to enlarge the buffer size to returned value +1.
*****************************************************************************/
int evel_json_encode_event(char * json,
int max_size,