Module: kamailio
Branch: master
Commit: 1e5ea9beeb3055e0303eef992ffa87f61d8f0bf9
URL: 
https://github.com/kamailio/kamailio/commit/1e5ea9beeb3055e0303eef992ffa87f61d8f0bf9

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-12-08T09:01:18+01:00

auth_radius: safety check for r variable

---

Modified: src/modules/auth_radius/sterman.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/1e5ea9beeb3055e0303eef992ffa87f61d8f0bf9.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1e5ea9beeb3055e0303eef992ffa87f61d8f0bf9.patch

---

diff --git a/src/modules/auth_radius/sterman.c 
b/src/modules/auth_radius/sterman.c
index a8cf8f93cc..db50b39df6 100644
--- a/src/modules/auth_radius/sterman.c
+++ b/src/modules/auth_radius/sterman.c
@@ -93,7 +93,7 @@ static inline int extract_avp(
                        name->s.len = p - vp->strvalue;
                        name->s.s = vp->strvalue;
                        value->n = strtol(++p, &r, 10);
-               } else if(p && p != r && !q) {
+               } else if(p && r && p != r && !q) {
                        /* int name and int vale */
                        name->n = strtol(++p, &q, 10);
                        value->n = strtol(++r, &q, 10);


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to