Module: sip-router
Branch: sr_3.0
Commit: 4e49d033a49131a763b604c0d1f009d2a7c558fe
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4e49d03…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
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';
}