From 968171e48fa19d97bd7612ef9458935cec4968a3 Mon Sep 17 00:00:00 2001
From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637>
Date: Fri, 24 Jul 2009 13:47:08 +0000
Subject: [PATCH] fix crash when no newline at the end of config file.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@550 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
---
 linphone/coreapi/lpconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linphone/coreapi/lpconfig.c b/linphone/coreapi/lpconfig.c
index f513ad9dfc..13021a3775 100644
--- a/linphone/coreapi/lpconfig.c
+++ b/linphone/coreapi/lpconfig.c
@@ -185,7 +185,7 @@ void lp_config_parse(LpConfig *lpconfig){
 					
 					pos1++;
 					pos2=strchr(pos1,'\n');
-					if (pos2==NULL) pos2=pos1+strlen(pos2);
+					if (pos2==NULL) pos2=pos1+strlen(pos1);
 					else {
 						*pos2='\0'; /*replace the '\n' */
 						pos2--;
-- 
GitLab