git:sr_3.0: When string was in the form of 0= on\n\0 this function caused a segmentation fault(canaries where overwritten ).

1 message Options
Embed this post
Permalink
Henning Westerholt

git:sr_3.0: When string was in the form of 0= on\n\0 this function caused a segmentation fault(canaries where overwritten ).

Reply Threaded More More options
Print post
Permalink
Module: sip-router
Branch: sr_3.0
Commit: 4e49d033a49131a763b604c0d1f009d2a7c558fe
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4e49d033a49131a763b604c0d1f009d2a7c558fe

Author: Marius Zbihlei <[hidden email]>
Committer: Henning Westerholt <[hidden email]>
Date:   Mon Oct 26 17:16:37 2009 +0200

When string was in the form of 0=on\n\0 this function caused a segmentation fault(canaries where overwritten).
(cherry picked from commit e6f4dafdc43d90e9679ad4695e9729379245984d)

---

 modules/utils/conf.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/utils/conf.c b/modules/utils/conf.c
index cb4380d..0ba4feb 100644
--- a/modules/utils/conf.c
+++ b/modules/utils/conf.c
@@ -76,11 +76,10 @@ static void remove_spaces(char *s)
 {
  char *p, *dst;
 
- for (p = s, dst = s; *p != '\0'; ++p, ++dst) {
+ for (p = s, dst = s; *dst != '\0'; ++p, ++dst) {
  while (isspace(*p)) ++p;
  *dst = *p;
  }
- *dst = '\0';
 }
 
 


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