From 6c92bcdad163ca7c27e3b58e16cebd305563589b Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Tue, 25 Dec 2018 10:38:44 +0800 Subject: [PATCH] Clarify pointer's validity for documentation of current_option_ptr(). --- include/tins/utils/radiotap_parser.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/tins/utils/radiotap_parser.h b/include/tins/utils/radiotap_parser.h index 1651173..0a5150e 100644 --- a/include/tins/utils/radiotap_parser.h +++ b/include/tins/utils/radiotap_parser.h @@ -114,7 +114,11 @@ public: RadioTap::option current_option(); /** - * Gets the pointer at which the current option is located + * \brief Gets the pointer at which the current option is located + * + * A past-the-end pointer may be returned in case of malformed input or + * end of data. Its validity must be checked (e.g. using + * \ref RadioTapParser.has_fields) before dereference. */ const uint8_t* current_option_ptr() const;