Module: sip-router
Branch: master
Commit: 1faf19fa7d34528b6cc15ffcb1ec91a6c6074e90
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1faf19fa7d34528b6cc15ffcb1ec91a6c6074e90

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Mon Jun 30 12:05:19 2014 +0200

core: reset cur_opt shortcut after use, it points to local variable

- safety to prevent invalid access on future extensions

---

 cfg_parser.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cfg_parser.c b/cfg_parser.c
index fa8721b..594eb8e 100644
--- a/cfg_parser.c
+++ b/cfg_parser.c
@@ -732,7 +732,8 @@ int sr_cfg_parse(cfg_parser_t* st)
                        }
 
                        st->cur_opt = &t;
-                       if (process_option(st, opt) < 0) return -1;
+                       if (process_option(st, opt) < 0) { st->cur_opt = 0; 
return -1; }
+                       st->cur_opt = 0;
                        break;
 
                case '[': 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to