Module: sip-router Branch: master Commit: 80b1421caf597060e234ed389eb540b13879ce41 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=80b1421c...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Sep 29 23:33:02 2010 +0200
core: event_t uses param_hooks_t
- parse_params() requires a param_hooks_t field since it memsets it to 0, previously, the dialog specific hooks structure had a shorter size resulting in buffer overflow
---
parser/parse_event.c | 2 +- parser/parse_event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/parser/parse_event.c b/parser/parse_event.c index 89ccd89..4211da2 100644 --- a/parser/parse_event.c +++ b/parser/parse_event.c @@ -131,7 +131,7 @@ int event_parser(char* s, int len, event_t* e) /* We have parameters to parse */ if (e->type == EVENT_DIALOG) { pclass = CLASS_EVENT_DIALOG; - phooks = (param_hooks_t*)&e->params.dialog; + phooks = (param_hooks_t*)&e->params.hooks; }
if (parse_params(&tmp, pclass, phooks, &e->params.list) < 0) { diff --git a/parser/parse_event.h b/parser/parse_event.h index 25be9ce..ab51b79 100644 --- a/parser/parse_event.h +++ b/parser/parse_event.h @@ -48,7 +48,7 @@ enum event_type {
struct event_params { - struct event_dialog_hooks dialog; /* Well known dialog package params */ + param_hooks_t hooks; /* Well known dialog package params */ param_t* list; /* Linked list of all parsed parameters */ };