summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-06-09 21:11:43 +0000
committerRussell Bryant <russell@russellbryant.com>2010-06-09 21:11:43 +0000
commit05c46771ca08018a023a22c469747cdfd19e7d95 (patch)
tree667e0e9d107d99cda2847ed7af98649a60791345 /include
parent9aafd4c6b1d0fc0d18f5c064b3d062fc98833694 (diff)
Resolve an invalid memory read on an event.
Valgrind pointed out that attempting to get an IE value from an event that has no IEs produces an invalid memory read past the end of the event. Thanks to mmichelson for pointing the problem out to me and then testing the fix. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/event.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asterisk/event.h b/include/asterisk/event.h
index 727553c24..12459fc9d 100644
--- a/include/asterisk/event.h
+++ b/include/asterisk/event.h
@@ -663,9 +663,10 @@ size_t ast_event_get_size(const struct ast_event *event);
* \param iterator The iterator instance to initialize
* \param event The event that will be iterated through
*
- * \return Nothing
+ * \retval 0 Success, there are IEs available to iterate
+ * \retval -1 Failure, there are no IEs in the event to iterate
*/
-void ast_event_iterator_init(struct ast_event_iterator *iterator, const struct ast_event *event);
+int ast_event_iterator_init(struct ast_event_iterator *iterator, const struct ast_event *event);
/*!
* \brief Move iterator instance to next IE